DecryptSymmetric
→ stringDecrypts a string that was encrypted with EncryptSymmetric using the same algorithm and key.
Available in:
Email
CloudPage
Automation
Triggered Send
Syntax
Platform.Function.DecryptSymmetric(encryptedValue, algorithm, password, passwordSalt, initializationVector, initializationVectorSalt)
6 arguments
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
encryptedValue |
string | Yes | Ciphertext to decrypt |
algorithm |
string | Yes | Same algorithm used when encrypting |
password |
string | Yes | Same password or key name used when encrypting |
passwordSalt |
string | Yes | Same salt used when encrypting |
initializationVector |
string | Yes | Same IV used when encrypting |
initializationVectorSalt |
string | Yes | Same IV salt used when encrypting |
Examples
var ciphertext = Platform.Function.Lookup("SecureData", "ciphertext", "id", id);
var plain = Platform.Function.DecryptSymmetric(
ciphertext,
"AES",
"myKeyName", "",
"myIVName", ""
);