EncryptSymmetric
→ stringEncrypts a string using a symmetric key (AES or other) registered in SFMC Key Management.
Available in:
Email
CloudPage
Automation
Triggered Send
Syntax
Platform.Function.EncryptSymmetric(value, algorithm, password, passwordSalt, initializationVector, initializationVectorSalt)
6 arguments
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
value |
string | Yes | Plain text to encrypt |
algorithm |
string | Yes | Cipher algorithm, e.g. "AES" |
password |
string | Yes | Encryption password or key name |
passwordSalt |
string | Yes | Salt for the password. Pass empty string to use password as-is |
initializationVector |
string | Yes | IV value |
initializationVectorSalt |
string | Yes | Salt for the IV |
Examples
var encrypted = Platform.Function.EncryptSymmetric(
"my secret data",
"AES",
"myKeyName", "",
"myIVName", ""
);