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
Solved! Go to Solution.
Hi Lise,
The crypt function is the one to go in ACC and the documentaiton provided is correct
https://experienceleague.adobe.com/developer/campaign-api/api/f-cryptString.html
Calling JS in the HTML has its own syntax and I suspect that's what you're facing. Could you do the following test if not alredy done
If a workflow: use a JS Code activity and place the following code and you'll have a result
Then in the HTML the way to call a JS function is Adobe specific using <% %> element
At the top of the delivery, put the following
<% include(put the JS library internal name where you have created the wallet function);
var cryptParams = WalletEncryption(targetData.LOYALTYCARDNUMBER)
%>
Then you will have yout HTML body as expected and if you want to print the value of the variable cryptParams you use the following
<%= cryptParams %>
That should work.
Thanks
Denis
Check this thread
Thanks David
But it not help me. We have developped a js code and on our html we have call the function but i get an error each time i test it.
Here is our code:
function WalletEncryption(CarteFid)
{
// Initialisation des paramètres de cryptage
var key = "xxxxx";
// Cryptage des paramètres données
var cryptParams = cryptString(CarteFid, key);
return cryptParams;
}
And what we have added on our html:
eval(yr_gene:WalletEncryption.js.data); var cryptParams = cryptString(targetData.LOYALTYCARDNUMBER, key);
Views
Replies
Total Likes
hi David,
Your document are related to ACS not ACC .
So is there any people who could help me or who have already implemented an AEC CBC encryption ?
Rgds
Views
Replies
Total Likes
Hi Lise,
The crypt function is the one to go in ACC and the documentaiton provided is correct
https://experienceleague.adobe.com/developer/campaign-api/api/f-cryptString.html
Calling JS in the HTML has its own syntax and I suspect that's what you're facing. Could you do the following test if not alredy done
If a workflow: use a JS Code activity and place the following code and you'll have a result
Then in the HTML the way to call a JS function is Adobe specific using <% %> element
At the top of the delivery, put the following
<% include(put the JS library internal name where you have created the wallet function);
var cryptParams = WalletEncryption(targetData.LOYALTYCARDNUMBER)
%>
Then you will have yout HTML body as expected and if you want to print the value of the variable cryptParams you use the following
<%= cryptParams %>
That should work.
Thanks
Denis
Hi Denis
Thanks for your help but is there is a need to convert the key in base 64 ?
Because the conversion is not working properly we have a redirection from our NL to Wallet and the cryted parameters seems to be not the right one.
Thanks
Views
Replies
Total Likes
Views
Replies
Total Likes
Hi Lise,
You might want to try to use the MemoryBuffer class which allow to convert into base64
You would
DO NOT FORGET to invoke the "dispose" function otherwise you will never release resources (memory) and you will jam your instance up to a point it crashes
https://experienceleague.adobe.com/developer/campaign-api/api/c-MemoryBuffer.html
It might work,
Thanks
Denis
Views
Likes
Replies
Views
Likes
Replies