Encrypt URL parameters for Preference Center | Community
Skip to main content
Level 4
Oct 8, 2019 5:51 PM UTC
Solved

Encrypt URL parameters for Preference Center

Hi,

I am looking to encrypt URL parameters for the Unsubscribe link at all the delivery templates using 64bit encryption.

there is out of the box few function but the client is specifically looking for 64 bit encryption Utf 8.

I have created a javascript code file and I am having problem calling that into the template

example: if the url currently that takes you to preference center is www.google.com?email=xxx@gmail.com&country=usa need to get encrypted to render as

http://www.google.com?params=KLLK776WEWLXXZZLKLKLSDD

LET ME KNOW

THANKS

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
vendimb15716755Accepted solution
Level 4
Oct 11, 2019 3:41 PM UTC

I got this one working. below is the code on the personalized block if anyone interested

<%

  loadLibrary("wp:base64.js");

  var _email= recipient.email;

  var _id = recipient.id;

  var url = "id=" + _id + "&email=" + _email;

%>

<%@ value object="provider" xpath="@trackingURL" %>/webApp/tstPreferenceCenter?params=<%=escapeUrl(Base64.encode(url))%>

11 replies

Raj_Ganta-1
Level 5
Oct 8, 2019 7:00 PM UTC

Hi,

I am copy-pasting the code that was used earlier but you can make changes as per your requirements. it is available to code but I am iterating it here. We can use the encrypt and decrypt functions to take care of.

AES encrypt and decrypt · GitHub

shoot me if you need more info on how we can make use of these functions with HTTP clientrequests.

1. we need to encrypt the email id or any other field while sending out email and decrypt it once we get a response. the total process depends on how this flow is handled at your org.

Translate