Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

Problem to encrypt/decrypt data in Adobe Campaign Standard

alejandrom59652
Level 2
Level 2

Hi everyone,

i would like to have help in some problem that i have when i use encryption_aescbcEncrypt and encryption_aescbcDecrypt funtions. Specifically, the problem  looks to be when i try to decrypt back the data that i encrypt before. After Decrypt funtion the data cames ''empty''. i will try to explain what i am doing with an example:

I have taken a client from my database in a workflow to encrypt his email. As it shows in the Adobe campaign standard guide functions, https://helpx.adobe.com/campaign/standard/automating/using/list-of-functions.html, I used the functions encryption_aescbcDecrypt and encryption_aescbcEncrypt. I have used the same parameters in the functions that are shown in the adobe example for take the key in HEX format and for the initialization vector:

  •      encryption_aescbcEncrypt (Email, "x0123456789ABCDEF0123456789ABCDEF", "x0123456789ABCDEFFEDCBA9876543210").

  •      encryption_aescbcDecrypt (Email Encrypted, "x0123456789ABCDEF0123456789ABCDEF", "x0123456789ABCDEFFEDCBA9876543210").

The problem is when i am decrypting. It doesn`t return the initial value of email, it returns an empty space.

Thank you all.

1 Accepted Solution
rahulg1930481
Correct answer by
Level 4
Level 4

I also faced the same issue, after debugging I found that when the length of encrypted string is more than the length of field in which you are storing, then some character will get truncated. This in turn causes the decrypt function to return a blank value. Try encrypting the string in any online tool and compare it with string stored in campaign, if some characters are truncated in campaign try increasing the length of that field in campaign.

View solution in original post

1 Reply
rahulg1930481
Correct answer by
Level 4
Level 4

I also faced the same issue, after debugging I found that when the length of encrypted string is more than the length of field in which you are storing, then some character will get truncated. This in turn causes the decrypt function to return a blank value. Try encrypting the string in any online tool and compare it with string stored in campaign, if some characters are truncated in campaign try increasing the length of that field in campaign.

View solution in original post