Diese Konversation wurde aufgrund von Inaktivität geschlossen. Bitte erstellen Sie einen neuen Post.
Level 1
Level 2
Melden Sie sich an, um alle Badges zu sehen
Diese Konversation wurde aufgrund von Inaktivität geschlossen. Bitte erstellen Sie einen neuen Post.
Hello All,
I cannot find function in JSAPI that encrypts string with key all the functions for this are deprecated
decryptPassword() how that works you do not provide any key to it.
Do we have more information around this topic?
I need to decrypt encrypted query parameters by AEM
Marcel
Gelöst! Gehe zu Lösung.
Zugriffe
Antworten
Likes gesamt
Hey,
Indeed, says deprecated but works normally (build 9359).
The test I've made:
Instance 1:
var firstName = 'John'
var lastName = 'Doe'
var language = 'NL'
var email = 'john.doe@gmail.com';
var key = 'abcdefghijklmnopqrstuvwx12345678'; // key with 32 bytes
logInfo('email= '+cryptString(email, key);
logInfo('firstName= '+cryptString(firstName, key);
logInfo('lastName= '+cryptString(lastName, key);
Result:
lastName= @kwVuNfze15Wy1FYoXboEvQ==
irstName= @HT2m15epsQxgzTPoWnDzgw==
email= @vVyMeUIZPeQkNJ5rVvMJV8ooQvxuHXmZQRNHa9612qM=
Instance 2:
var key = 'abcdefghijklmnopqrstuvwx12345678'; // key with 32 bytes
var firstName = "@HT2m15epsQxgzTPoWnDzgw=="
var lastName = "@kwVuNfze15Wy1FYoXboEvQ=="
var email = "@vVyMeUIZPeQkNJ5rVvMJV8ooQvxuHXmZQRNHa9612qM="
logInfo("email: " + decryptString(email, key));
logInfo("firstName: " + decryptString(firstName, key));
logInfo("lastName: " + decryptString(lastName, key));
result:
firstName: John
lastName: Doe
cemail: john.doe@gmail.com
I used 2 instances to eliminate any possibility of the function using the instance ID as key.
Hello @Marcel_Szimonisz
You can use the CryptoJS library to encrypt and decrypt the data.
The sample code is shared by @CedricRey on this thread.
Zugriffe
Antworten
Likes gesamt
Hello @_Manoj_Kumar_ ,
crypto js is it compatible with the adobe's JSSP ? so basically I need to find external library to crypt decrypt strings that is compatible with Adobe JSSP
Zugriffe
Antworten
Likes gesamt
Hello @Marcel_Szimonisz
Yes, that seems to be the only way, because decrpyString is not deprecated.
Also, decryptPassword is used to decrypt the password for external accounts.
So, if you are looking to encrypt and decrypt anything other than passwords then you will have to rely on an external library.
Zugriffe
Antworten
Likes gesamt
Unless I'm wrong the JSAPI function cryptStrig is still available
https://experienceleague.adobe.com/developer/campaign-api/api/f-cryptString.html?hl=encrypt
and @_Manoj_Kumar_ shared a sample from Cedric that uses the cryptString...
Saying that, any reason why you would want to encrypt a string already crypted?
I always find encrypting / decrypting very hard to nail down between system due to the sensitivity of the underlying libraries used by each system, ACC uses JavaScrupt and you might need to decrypt using Java or .Net or php or JavaScript, you will spend hours to nail down and align the encryption with the decryption..
try cryptString mentioned above.
Thanks
Denis
Zugriffe
Antworten
Likes gesamt
Hello @Denis_Bozonnet ,
How do I decrypt such encrypted link in JSSP. I was trying to find new version for
https://experienceleague.adobe.com/developer/campaign-api/api/f-decryptString.html
Thanks a lot for your help
Marcel
Zugriffe
Antworten
Likes gesamt
Hello @Denis_Bozonnet,
I wanted to encrypt query parameters on AEM side and then descrypt on Adobe Campaign side on landing lage.
Marcel
Zugriffe
Antworten
Likes gesamt
Were you able to resolve this query with the help of the given solutions or do you still need more help here? Do let us know. In case the given solutions were helpful, then kindly choose the one that helped you the most as the 'Correct Reply'.
Thanks!
Zugriffe
Antworten
Likes gesamt
Hello @jorgeferreira ,
but how do i decrypt crypted string 🙂 decrypt function is deprecated.. i suppose it is deprecated but it works.. i will need to check it myself. thanks a lot
Marcel
Zugriffe
Antworten
Likes gesamt
Hey,
Indeed, says deprecated but works normally (build 9359).
The test I've made:
Instance 1:
var firstName = 'John'
var lastName = 'Doe'
var language = 'NL'
var email = 'john.doe@gmail.com';
var key = 'abcdefghijklmnopqrstuvwx12345678'; // key with 32 bytes
logInfo('email= '+cryptString(email, key);
logInfo('firstName= '+cryptString(firstName, key);
logInfo('lastName= '+cryptString(lastName, key);
Result:
lastName= @kwVuNfze15Wy1FYoXboEvQ==
irstName= @HT2m15epsQxgzTPoWnDzgw==
email= @vVyMeUIZPeQkNJ5rVvMJV8ooQvxuHXmZQRNHa9612qM=
Instance 2:
var key = 'abcdefghijklmnopqrstuvwx12345678'; // key with 32 bytes
var firstName = "@HT2m15epsQxgzTPoWnDzgw=="
var lastName = "@kwVuNfze15Wy1FYoXboEvQ=="
var email = "@vVyMeUIZPeQkNJ5rVvMJV8ooQvxuHXmZQRNHa9612qM="
logInfo("email: " + decryptString(email, key));
logInfo("firstName: " + decryptString(firstName, key));
logInfo("lastName: " + decryptString(lastName, key));
result:
firstName: John
lastName: Doe
cemail: john.doe@gmail.com
I used 2 instances to eliminate any possibility of the function using the instance ID as key.
Hello Marcel,
I have been through some rough terrains with cryptString and decryptString as well.
For your specific question, I assume decryptPassword only works for external accounts because the key is the instanceID.
If you check the doc on cryptString, one of the remarks is:
Zugriffe
Likes
Antworten
Zugriffe
Likes
Antworten