Syntax

Platform.Function.EncryptAsymmetric(value, keyName)
2 arguments

Parameters

Name Type Required Description
value string Yes Plain text to encrypt
keyName string Yes Name of the public key registered in SFMC Key Management

Examples

var sensitive = "creditcard:4111111111111111";
var encrypted = Platform.Function.EncryptAsymmetric(sensitive, "MyPublicKey");
Platform.Function.InsertData("EncryptedLog", ["encryptedValue"], [encrypted]);

Notes

Keys must be configured under Setup → Platform Tools → Security → Key Management before use. This function uses the registered public key to encrypt; decryption requires the corresponding private key outside SFMC.

See Also