[SalesForce] DecryptSymmetric with triple DES errors

%%[
VAR @value, @dec, @email, @other, @null
SET @email = emailaddr
SET @null = 
SET @value = Lookup("Encrypted Jimmy Testing","EncrypText","emailAddress",@email)
SET @dec = Base64Decode(DecryptSymmetric(@value, 'tripledes', @null, 'TestKey', @null, @null, @null, @null))
]%%

Testing stuff<br />
%%=v(@email)=%%<br />
%%=v(@value)=%%<br />
%%=v(@dec)=%%<br />

I get the error: An error occurred when attempting to evaluate a DecryptSymmetric function call. See inner exception for details.

The encrypted string is: U2FsdGVkX184wRqUXjZxreLHvWAasKdGgp90k0oXRsXYIJ6ZAJnoEJUX9GcsSZUfUEd97FuDsLD67mNUBAUENA==

Best Answer

I assume you encrypted the data somehow that didn't use the EncryptSymmetric() function. AMPScript's Symmetric Crypto functions are intended to only be used within the Marketing Cloud vs 3rd party encryption/decryption. If you have a compelling reason to go down the road of using a symmetric encryption outside the MC environment there is a blog post written by a partner that covers the topic.

Related Topic