Converts a string to a 128-bit hexadecimal MD5 hash.
Availability
<table> <tr> <td>Marketing Cloud Engagement</td> <td>✅ Yes</td> </tr> <tr> <td>Marketing Cloud Next</td> <td>✅ Yes</td> </tr> </table>Syntax
MD5(stringToConvert, charSet)
The MD5() function has two parameters:
stringToConvert(string): Required. The string to encode.charSet(string): The character set to use for encoding. Accepted values areUTF-8andUTF-16. The default value isUTF-8.
Usage
To use this function, pass it a string.
%%=MD5("This is a string of text.")=%%
The function outputs an MD5 hash of the provided string: 7ccb47715d465a9e6a2b7d3c0441da80
You can also generate the hash using UTF-16 encoding, as in this example.
%%=MD5("This is a string of text.", "UTF-16")=%%
The function outputs an MD5 hash that uses UTF-16 encoding: 3251ab3b9d54f085f6b57aa3bc134c3c