Function generateSimplePasswordHash
Generates a psasword hash using MD5 together with a 32-bit salt.
Prototype
string generateSimplePasswordHash( string password, string additional_salt );
Parameters
Name | Description |
---|---|
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 fuction 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.