---
schema_version: "1"
id: 8e99036af3a1e37368828532b14155fc1dd1095a82f19843fabff202dc31bbb1
title: AMPscript Encryption Functions
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/marketing-cloud/ampscript/references/encryption/mc-ampscript-reference-encryption.md
canonical_url: https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-encryption/mc-ampscript-reference-encryption.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 3a44b790d77ea8f1fab3a2d960d21b5a285fc71e20065281fc6dd3133fdc4dae
products:
  - AMPscript for Marketing Cloud
  - Marketing Cloud
---
# 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()](https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-encryption/mc-ampscript-reference-encryption-decrypt-symmetric.md)  | Decrypts encrypted data using the supplied algorithm and encryption values.  | ✅&nbsp;Yes | ❌&nbsp;No |
| [EncryptSymmetric()](https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-encryption/mc-ampscript-reference-encryption-encrypt-symmetric.md)  | Encrypts plain text data using the supplied algorithm and encryption values. | ✅ Yes      | ❌ No      |
| [GetJwt()](https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-encryption/mc-ampscript-reference-encryption-get-jwt.md)                      | Creates a JSON Web Token (JWT).                                              | ✅ Yes      | ❌ No      |
| [GetJwtByKeyName()](https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-encryption/mc-ampscript-reference-encryption-get-jwt-by-key-name.md) | Creates a JSON Web Token (JWT) by using a key stored in Key Management.      | ✅ Yes      | ❌ No      |
| [MD5()](https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-encryption/mc-ampscript-reference-encryption-md5.md)                             | Converts a string to a 128-bit hexadecimal MD5 hash.                         | ✅ Yes      | ✅ Yes     |
| [SHA1()](https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-encryption/mc-ampscript-reference-encryption-sha1.md)                           | Converts a string to a 160-bit hexadecimal SHA-1 hash.                       | ✅ Yes      | ✅ Yes     |
| [SHA256()](https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-encryption/mc-ampscript-reference-encryption-sha256.md)                       | Converts a string to a 256-bit hexadecimal SHA-2 hash.                       | ✅ Yes      | ✅ Yes     |
| [SHA512()](https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-encryption/mc-ampscript-reference-encryption-sha512.md)                       | Converts a string to a 512-bit hexadecimal SHA-2 hash.                       | ✅ Yes      | ✅ Yes     |
