Last active
February 21, 2024 12:41
-
-
Save camrobert/3e2ac76ac3db9b1c0f384b08530d6ccc to your computer and use it in GitHub Desktop.
AMPscript to Encrypt and Decrypt Symmetric using DES to use with external services
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%%[ | |
SET @text = "Cameron Robert" | |
SET @key = "8ce32e59" /* https://www.browserling.com/tools/random-hex */ | |
OutputLine(Concat("Encrypted: ", EncryptSymmetric(@text, "des;mode=ecb;padding=pkcs7", @null, @key),"<br><br>")) | |
SET @enctext = "iJwqnvvKdIIn7AKQOg1LHA==" | |
OutputLine(Concat("Decrypted: ", DecryptSymmetric(@enctext, "des;mode=ecb;padding=pkcs7", @null, @key),"<br><br>")) | |
]%% |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment