Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

Decrypt external account password from interaction.js

Aalokitoaami
Level 3
Level 3

I am doing some username password validation inside interaction.js file.

I was on version 8860 and I was using decryptString(encPass.toString()) password and it was working fine.

I am trying the same on 8891 version and the same code is not returning any value. I saw that the function is deprecated and suggesting to use decryptPassword instead. Not the decryptPassword is giving error "ReferenceError: decryptPassword is not defined"

After checking the documentation I found decryptPassword is only available in SOAP whereas the decryptString was available in more areas including JSSP.

So what is the equivalent function which is available in JSSP and other types (workflow, webapp, delivery) and can be used to decrypt password for external account.

Alternatively I am thinking about xtk.session.Logon method. But if called from javascript, does it make SOAP call internally or it just does a local execution. For the performance reason I don't want to make another SOAP call from interaction.js file.

Is there any other function that I can use to encrypt a password from interaction.js and compare with the encrypted password. That way I will not require to decrypt the password to compare.

I tried the xtk.session.hashpassword also but no luck.

1 Accepted Solution
wodnicki
Correct answer by
Community Advisor
Community Advisor

Hi,

To decrypt extaccount passwords, use decryptString(), which is accessible via jsapi in jssp's.

Have to ask though, what are you authenticating specifically?

Thanks,

-Jon

View solution in original post

2 Replies
wodnicki
Correct answer by
Community Advisor
Community Advisor

Hi,

To decrypt extaccount passwords, use decryptString(), which is accessible via jsapi in jssp's.

Have to ask though, what are you authenticating specifically?

Thanks,

-Jon

View solution in original post

scott-simmer
Level 2
Level 2

decryptString

Warning:

This command is deprecated for the decryption of passwords stored in an external account, use decryptPassword().