vibe.d beta banner
get vibe.d
0.10.1

Asynchronous I/O that doesn’t get in your way, written in D

Function generateSimplePasswordHash

Generates a password hash using MD5 together with a 32-bit salt.

deprecated string generateSimplePasswordHash (
  string password,
  string additional_salt = null
);

Parameters

NameDescription
password The password for which a one-way hash is to be computed
additional_salt An optional string that is used to compute the final hash. The same string must be given to testSimplePassword to verify a password later. If this string is kept secret, it can enhance the security of this function.

Returns

A base64 encoded string containing the salt and the hash value is returned.

Remarks

MD5 is not considered safe and is computationally cheap. Although the use of salt helps a bit, using this function is discouraged for systems where security matters.

See Also

testSimplePasswordHash, vibe.crypto.md5

Authors

Sönke Ludwig

Copyright

© 2012 RejectedSoftware e.K.

License

Subject to the terms of the MIT license, as written in the included LICENSE.txt file.