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
Bedrock Mission!

Learn more

View all

Sign in to view all badges

AES CBC encryption

lise-maried3889
Level 2
Level 2

Hi

 

I need to implement a crypting function which will use "encryption_aescbcEncrypt" 

It's the first time I implement it so i'm a bite lost of how to done it in the console.

Could you please help me with the code i need to use ? I've already the Key but i don't know if i must create a JS Code and call the parameter in the delivery in order to encrypt the information I want.

 

Any help would be appreciated

 

Thanks

9 Replies
SatheeskannaK
Community Advisor
Community Advisor

Hi @lise-maried3889,

 

Usually this is done using additional data on query activity or enrichment activity. You can encrypt the email address like below,

encryption_aescbcEncrypt(@email,'\x111111adc2a2b2b22f', '\xd2222222e333ecd11')

 

Thanks!

lise-maried3889
Level 2
Level 2

Could you please show me how to done it in a workflow ?

Thanks

johnwwilcoxmba
Level 5
Level 5

I suggest creating a workflow and in the query profile step add additional data.  For instance use this expression: encryption_aescbcEncrypt(@email,'\1111111111111111', '\22222222222222222')

 

Then your delivery can access the data under additional information.

lise-maried3889
Level 2
Level 2

I've received a key for the encryption i need to us so how you implement it in the expression ?

 

thanks

lise-maried3889
Level 2
Level 2

i've done it like this:

 

lisemaried3889_0-1637077386699.png

is it correct ? I've done an enrichment on my workflow.

johnwwilcoxmba
Level 5
Level 5

Here is the query step and the delivery using the variable.Enc1.pngEnc2.png

lise-maried3889
Level 2
Level 2

I use ACC not ACS so i'm not sure it works like that for me.

lise-maried3889
Level 2
Level 2

oups sorry i will post it in the right one.

 

By the way thanks for your help !