AMPscript Encryption Functions
Use the AMPscript encryption functions to encrypt or encode data.
This table lists all of the AMPscript functions related to encryption. The value in the Engagement column indicates whether Marketing Cloud Engagement supports the function. The value in the Next column indicates whether Marketing Cloud Next supports the function.
| Function Name | Description | Engagement | Next |
|---|---|---|---|
| DecryptSymmetric() | Decrypts encrypted data using the supplied algorithm and encryption values. | ✅ Yes | ❌ No |
| EncryptSymmetric() | Encrypts plain text data using the supplied algorithm and encryption values. | ✅ Yes | ❌ No |
| GetJwt() | Creates a JSON Web Token (JWT). | ✅ Yes | ❌ No |
| GetJwtByKeyName() | Creates a JSON Web Token (JWT) by using a key stored in Key Management. | ✅ Yes | ❌ No |
| MD5() | Converts a string to a 128-bit hexadecimal MD5 hash. | ✅ Yes | ❌ No |
| SHA1() | Converts a string to a 160-bit hexadecimal SHA-1 hash. | ✅ Yes | ❌ No |
| SHA256() | Converts a string to a 256-bit hexadecimal SHA-2 hash. | ✅ Yes | ❌ No |
| SHA512() | Converts a string to a 512-bit hexadecimal SHA-2 hash. | ✅ Yes | ❌ No |