Function to obtain MD5 hash code of a text string.

 

Syntax

function MD5(sData: string): string;

 

Parameters and return values

Parameter

Type

Value

sData

string

source string.

 

Function result

Hash value as a text string.

 

Example

const
  sMessage = 'Have a nice day!';
begin
  mLogScript('Original message: ' + sMessage, '');
  mLogScript(StrToHex(MD5(sMessage)), 'MD5');
end.

Script work result

[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.
 

See also

mLogScript

StrToHex