(Note: An established "key stretching" algorithm
( http://en.wikipedia.org/wiki/Key_stretching#History ) would be an even
better choice of
digest since they provide better protection against
highly-parallelized (ex: GPU) brute-force attacks. But SHA-512, as an SHA-2
algorithm, is still considered cryptographically secure.)
Supports both template-style and OO-style digests. See the documentation of std.digest.digest for details.
Salt is optional. It will be generated at random if not provided.
password are combined as (psuedocode) '
There is no cryptographic benefit to combining the
other way. However, if you need to support an alternate method for
compatibility purposes, you can do so by providing a custom
See the implementation of DAuth's
defaultSalter to see how to do this.
Hash!TDigest makeHash(TDigest)( Password password, Salt salt, Salter!TDigest salter ); Hash!TDigest makeHash(TDigest)( Password password, Salter!TDigest salter ); Hash!Digest makeHash()( Digest digest, Password password, Salt salt, Salter!Digest salter ); Hash!Digest makeHash()( Digest digest, Password password, Salter!Digest salter );
salt - Default value is 'randomSalt()'