Hi all,
I'm having a CSV file that is full with URLs and some parameters, i want to Crypt those parameters using the function encryptDES and then export that file but with crypted parameters.
My question here is if there is a way using workflows to take datas from CSV file and crypt them then export the datas crypted to a new CSV file ? or if there is other way to do the same thing without workflow
Thanks.
Solved! Go to Solution.
Hi Badr,
You can achieve your goal either by a Javascript activity before the Extract file activity (or in the Javascript tab of the Extract activity, but less "visible"), in that case, add the node in the temp:schema with XML functions of AC API, or, for simple use cases, what I do usually is doing the conversion directly in the Format Data of the extract activity:
(cryptString or SHA256 or whatever can be done here easily and efficiently considering performance with high volumes):
So you have to add your fields (button New) and unselect the checkbox of the fields coming from the 1st page (query) of Extract activity:
And by clicking in Detail icon of the new added fields, place your Javascript code conversion.
Use the toolbar button list box to generate the source.target__XXX or type it directly.
Regards
J-Serge
Hello,
Yes, you can do that.
Click the link hope it will help you How to use workflow data
Regards,
Venu
Views
Replies
Total Likes
Hi Venur and thank you for responding,
But my problem here is different, i want to encrypt de parameteres not the file, for exemple im having a CSV file with the following fields:
-Url
-Name
-Age
-Title
i want to encrypt the Name, Age and Title using encryptDES and after export the file with :
-Url
-EncryptedName
-EncryptedAge
-EncryptedTitle
Thanks.
Views
Replies
Total Likes
Hi Badr,
this subject was partially covered in Functions to encrypt or decrypt PII data in Adobe Campaign Classic
Please note, DES is considered insecure, you should favor AES if you can.
You could add a custom function to encrypt in Adobe Campaign : Adding additional SQL functions or get the temp:schema in a JS activity, loop over each row and use a method such as cryptString on the field to be encrypted.
Kind regards,
Pierre
Views
Replies
Total Likes
Hi Badr,
Take care, DES is deprecated crypt algorithm.
Please use cryptString function that uses AES algorithm:
http://docs.campaign.adobe.com/doc/AC/en/jsapi/f-cryptString.html?hl=crypt
and its counterpart, decryptString function.
When it is url, don't forget to encode URL when passing it to a web site.
Sometimes the use case is not symetric algorithm (reversible decrypt) such AES but only hash MD5 or SHA256 (no reversible but usable for comparison), in that case use these functions instead.
Regards
J-Serge
Views
Replies
Total Likes
Hii Pierre and thanks for your answer,
I'm actualy working on the JS activity, and i crypted the values and i can see them crypted with the logInfo.
I'm blocked in the exporting part, it will be so helpful if you can provide the code JS activity uses to export a string to txt or CSV.
Thanks
Views
Replies
Total Likes
Hi J-Serge thanks for responding,
I will consider your advice and i will try to use cryptString.
My probelem here is to export datas to text file after crypt them, if there is a way with JS activity or using advanced expression in the data extraction activity.
Thanks.
Views
Replies
Total Likes
Hi Badr,
the extract data activity needs a inbound temp:schema, so you can write your modified data in a list.
a more complicated solution, you can modifiy your SQL temp table.
Kind regards,
Pierre
Views
Replies
Total Likes
Hi Badr,
You can achieve your goal either by a Javascript activity before the Extract file activity (or in the Javascript tab of the Extract activity, but less "visible"), in that case, add the node in the temp:schema with XML functions of AC API, or, for simple use cases, what I do usually is doing the conversion directly in the Format Data of the extract activity:
(cryptString or SHA256 or whatever can be done here easily and efficiently considering performance with high volumes):
So you have to add your fields (button New) and unselect the checkbox of the fields coming from the 1st page (query) of Extract activity:
And by clicking in Detail icon of the new added fields, place your Javascript code conversion.
Use the toolbar button list box to generate the source.target__XXX or type it directly.
Regards
J-Serge
Hi J-Serge,
Your way worked perfectly, thank you so much for your help.
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies