Encrypt URL parameters for Preference Center | Community
Skip to main content
New Participant
October 8, 2019
Solved

Encrypt URL parameters for Preference Center

  • October 8, 2019
  • 11 replies
  • 14154 views

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.
Best answer by vendimb15716755

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
New Participant
October 8, 2019

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.