Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Encrypting a Marketing Email URL

Former Member
0 Kudos

HI,

We have a scenario in which we will be need to Encrypt (AES if possible), a  Hyperlink URL (more specifically the parameters) in our Marketing campaigns in CRM 7.0

Could someone tell how this might be achieved?

Regards

Graham

1 ACCEPTED SOLUTION

martin_voros
Active Contributor
0 Kudos

Hi,

I assume that you already know where you can modify parameters and you just want to be able to encrypt HTTP parameter using secret key. Recently, I implemented similar requirement but it was for SSO with 3rd party app. One of the POST attributes had to be encrypted with 3DES. The issue is that there is no implementation of DES or AES in ABAP. The only encryption provided by ABAP AS is encryption that uses PKCS#7 format. For example it's used for encrypting credit card details. The first option is to implement DES/AES in ABAP but implementing crypto is really hard and it will take some time. My workaround for this was to use javascript engine provided by ABAP AS (class CL_JAVA_SCRIPT). So I took javascript implementation of 3DES and used it for encryption of required parameter. The only problem was with binding binary string (ciphertext) to ABAP variable. For some cases an interface between ABAP and Javascript truncated string. I assume that it thinks that the string is terminated but it's not. The solution for this problem is to encode binary string into base64 encoding in Javascript before exporting value to ABAP runtime.

Cheers

2 REPLIES 2

martin_voros
Active Contributor
0 Kudos

Hi,

I assume that you already know where you can modify parameters and you just want to be able to encrypt HTTP parameter using secret key. Recently, I implemented similar requirement but it was for SSO with 3rd party app. One of the POST attributes had to be encrypted with 3DES. The issue is that there is no implementation of DES or AES in ABAP. The only encryption provided by ABAP AS is encryption that uses PKCS#7 format. For example it's used for encrypting credit card details. The first option is to implement DES/AES in ABAP but implementing crypto is really hard and it will take some time. My workaround for this was to use javascript engine provided by ABAP AS (class CL_JAVA_SCRIPT). So I took javascript implementation of 3DES and used it for encryption of required parameter. The only problem was with binding binary string (ciphertext) to ABAP variable. For some cases an interface between ABAP and Javascript truncated string. I assume that it thinks that the string is terminated but it's not. The solution for this problem is to encode binary string into base64 encoding in Javascript before exporting value to ABAP runtime.

Cheers

0 Kudos

Martin, many thanks for this.  I'm not from a developer background directly in SAP, but understand the mechanisms.  We have to encrypt the whole parameter string of the POST URL as you say, in post processing of the email content from outbound CRM.   If I can find the point to "inject" the code, then this option may work for AES too.

Regards

Graham