--- title: "Create Hash Values" slug: "create-hash-values" description: "Mapp Engage functions that hash values with MD5 or SHA-256, for example to protect email addresses in exports or links." status: "update" updated: 2026-11-04T12:19:54Z published: 2026-11-04T12:19:54Z canonical: "docs.mapp.com/create-hash-values" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.mapp.com/llms.txt > Use this file to discover all available pages before exploring further. # Create Hash Values These functions apply cryptographic hashes to a value. You can apply hashes to values stored in profile attributes or Related Data. These functions take a string of any length as input and produce a fixed-length hash value. --- ## Function Overview | Function | Description | | --- | --- | | `ecx:md5hex` | Hashes a value with the message-digest algorithm 5. Produces a hexadecimal string. | | `ecx:md5base64` | Hashes a value with the message-digest algorithm 5. Produces a string that is encoded in Base64. | | `ecx:sha256hex` | Hashes a value with the Secure Hash Algorithm SHA-256. Produces a hexadecimal string. | --- ## ecx:md5hex The function `ecx:md5hex` hashes a value with the message-digest algorithm 5. The binary output is produced as a hexadecimal string. ### Example You set up a function that hashes the email address. This function protects personal data, which is exported from the system and shared with third parties for data analysis. The function is constructed as follows: ```plaintext ${ecx:md5hex(user['Email'])} ``` ### Structure `ecx:md5hex(string)` ### Parameters | Parameter | Description | | --- | --- | | `string` | Specifies the target value. Usually references an attribute or value that is stored in a related data set. Any value to be hashed can be referenced. | --- ## ecx:md5base64 The function `ecx:md5base64` hashes a value with the message-digest algorithm 5. The binary output is produced as a string that is encoded in Base64. > [!NOTE] > Note > > Strings that are encoded in Base64 cannot be used directly in link addresses. Either apply URL encoding to the resulting string or use the function `ecx:md5hex` instead. ### Example You set up a function that hashes the email address. This function protects personal data, which is exported from the system and shared with third parties for data analysis. The function is constructed as follows: ```plaintext ${ecx:md5base64(user['Email'])} ``` ### Structure `ecx:md5base64(string)` ### Parameters | Parameter | Description | | --- | --- | | `string` | Specifies the target value. Usually references an attribute or value that is stored in a related data set. Any value to be hashed can be referenced. | --- ## ecx:sha256hex The function `ecx:sha256hex` hashes a value with the Secure Hash Algorithm SHA-256. The binary output is produced as a hexadecimal string. ### Example You set up a function that hashes the email address. This function protects personal data, which is exported from the system and shared with third parties for data analysis. The function is constructed as follows: ```plaintext ${ecx:sha256hex(user['Email'])} ``` ### Structure `ecx:sha256hex(string)` ### Parameters | Parameter | Description | | --- | --- | | `string` | Specifies the target value. Usually references an attribute or value that is stored in a related data set. Any value to be hashed can be referenced. | --- ## Use Cases ### Hash export data The **Calculation** profile-based activity type can apply a hash to a recipient's email address and write the hashed value to a target attribute (stored as a **Profile Based Activity (Formula)**). The hashed value can be stored in any attribute. ```plaintext ${ecx:md5hex(user['Email'])} ``` ### Insert hashed values in links Apply a hash directly to a link in a message to transmit data without it being legible to unauthorized parties. Insert the value as a placeholder in the link: ```plaintext http://www.myshop.com/edit/?user=<%${ecx:md5hex(user['Email'])}%> ``` > [!NOTE] > Note > > If personal information is appended to links, you may need to activate tracking of individual links in personalized messages (see Activate Link Tracking for a Group).