Hi All,
Kindly let me know how to decrypt an encrypted parameter passed in URL and then it should be decrypted in jssp or webapp. Tried using decryptPassword as well but no luck.
Requirement- Sending encrypted email string in url to webapp or jssp and decrypt it in the corresponding jssp or webapp.
Failed Scenario 1- Sending email in url parameter from delivery as below:
em=<%= cryptString(targetData.email)%>
Fetching the parameter as below-
<h1>emailUrl: <%=request.getParameter("em")%></h1>
<h1>emailUrldecrypted: <%=decryptString(request.getParameter("em"))%></h1>
Output:-- "emailUrldecrypted" coming empty
Failed Scenario 2: Tried using escapeUrl :
em=<%= escapeUrl(cryptString(targetData.email))%>
Fetching the parameters as below-
<h1>emailUrl: <%=request.getParameter("em")%></h1>
<h1>emailUrldecrypted: <%=decryptString(request.getParameter("em"))%></h1>
Output:-- "emailUrldecrypted" coming empty
Failed Scenario 3: Tried using decryptPassword:
Fetching the parameters as below-
<h1>emailUrldecrypted: <%=decryptString(request.getParameter("em"))%></h1>
<h1>emailUrldecryptedPass: <%=decryptPassword(request.getParameter("em"))%></h1>
Output: Empty
Successful Scenario 4: Directly checking the email encryption without sending the email in the url:
<h1>email: <%=decryptString(cryptString ('poonam.dogra@abc.com'))%></h1>
Output:
I am positive that this might already be achieved by the fellow members, any insights on how to proceed will be extremely helpful.
Thanks in advance!
Solved! Go to Solution.
Views
Replies
Total Likes
Hello @Poonam_Dogra
Check the value of XtkKey and XtkSecretKey options under Administration > Platform > Options.
I believe these values are different on the servers in your case which is why the first 3 scenarios are failing for you because encryption and decryption are happening on other servers.
While in scenario 4 encryption and description are happening on the same server.
If you don't want to change the options, you can pass the secret key yourself.
Check point no. 3 in the remarks section of this page: cryptString (adobe.com)
Let me know if that helps.
Hello @Poonam_Dogra
Check the value of XtkKey and XtkSecretKey options under Administration > Platform > Options.
I believe these values are different on the servers in your case which is why the first 3 scenarios are failing for you because encryption and decryption are happening on other servers.
While in scenario 4 encryption and description are happening on the same server.
If you don't want to change the options, you can pass the secret key yourself.
Check point no. 3 in the remarks section of this page: cryptString (adobe.com)
Let me know if that helps.
Thank you @_Manoj_Kumar_ for suggestion, it worked!
Views
Replies
Total Likes
@Poonam_Dogra @_Manoj_Kumar_ Could you please let me know what steps you have followed to fix the issue. I also see the same issue (null) in both case .. 1) Directly using decryptString(EncryptedData) 2) decryptString(EncryptedData,'key')
Views
Replies
Total Likes
Hi @sameerk13731914 ,
Most probably , please check the key that you are using to decrypt is correct? For me , at that time, the key option that @_Manoj_Kumar_ suggested worked fine.
Views
Replies
Total Likes