MD5(text) Last updated: 13. Nov 2023

A utility function that takes a single input, converts it to a string, processes it through the MD5 hashing algorithm, and returns the hash value as an uppercase hexadecimal string. If provided with incorrect arguments, it returns null.

Parameters

Name Type Description
text string Text to create hash for.

Returns

Uppercase hexadecimal string. If provided with incorrect arguments, it returns null.

Example

Code example (#JS)

#JS is mixed HTML (or other text file) with inline JavaScript with # starting and ending each inline statement.
#{
    let x = "test";
    write(docly.MD5(x));
}#

Output

The #JS code above produces the output shown below:
098F6BCD4621D373CADE4E832627B4F6