MyChat Scripts Engine: StrToHex
Function to convert a original binary string to its hexadecimal text representation (in lowercase) by bytes.
Syntax
function StrToHex(sData: string): string;
Parameters and return values
Parameter |
Type |
Value |
sData |
string |
source binary string. |
Function result
Returns HEX value of the string elements in text form.
Example
const
sMessage = 'Have a nice day!';
begin
mLogScript('Original message: ' + sMessage, '');
mLogScript(StrToHex(MD5(sMessage)), 'MD5');
end.
Script work result
[22:33:30] (Log "StrToHex"): Original message: Have a nice day!
[22:33:30] (Log "StrToHex"): [MD5] ef90836d4196463521f557c5887caca9
[22:33:30] (Run "StrToHex"): Script operation time: 7 ms
[22:33:30] (Run "StrToHex"): Script done successfully