Function to obtain MD5 hash code of a text string.
function MD5(sData: string): string;
Parameter |
Type |
Value |
---|---|---|
sData |
string |
source string. |
Hash value as a text string.
const
sMessage = 'Have a nice day!';
begin
mLogScript('Original message: ' + sMessage, '');
mLogScript(StrToHex(MD5(sMessage)), 'MD5');
end.
[22:47:45] (Log "MD5"): Original message: Have a nice day!
[22:47:45] (Log "MD5"): [MD5] ef90836d4196463521f557c5887caca9
[22:47:45] (Run "MD5"): Script operation time: 7 ms
[22:47:45] (Run "MD5"): Script done successfully.