Please implement SCRAM in the SASL module. It implements challenge-response authentication and improves upon the CRAM-MD5 and DIGEST-MD5 methods. It can use an arbitrary hash function, although currently only SHA-1 seems to be widely supported (but since SHA-1 is broken, it might be a good idea to implement SCRAM-SHA-256 at the same time, or perhaps add a parameter through which the hash function can be selected).

It is defined in 5802]. A and B] of the RFC explain in detail how it improves upon the previous methods.