Hash40()
This function only exists for backward compatibility to Lucee 4.0 or older version that has produced an incorrect result for non us-ascii characters, Only use this function for backward compatibility, use Hash() instead.
Converts a variable-length string to a 32-byte, hexadecimal string, using the MD5 algorithm.
(It is not possible to convert the hash result back to the source string.) 32-byte, hexadecimal string.
Hash40( input=any, algorithm=string, encoding=string, numIterations=number );
Returns: String
Examples
my_string = "backward compatibility to Lucee 4.0";
hashed_string = hash40(input = my_string, algorithm = "SHA-512", numIterations = 20);
dump(hashed_string); //550C0FB966EEDDEFD49743C5D1880239D221DC3811216515630EB6A6BAA4B0A2845C445EFDCB5B5563CDDDFE7EE13DF67AA9E8670A99EA997E306EF0F5630092
See also
- Cryptography
- Hash()
- Search Issue Tracker
- Search Lucee Test Cases (good for further, detailed examples)