Question

Decrypt Passwort from Authentication Profile

Hi,

we have the requirement to store a so called "secret" in Pega. It needs to be encrypted because of Security constraints. My idea is to use the rule "Authenticate Profile" where I can store username and passwords. I'm able to read the value from the database, which is stored in pyPassword property, but of course it is encrypted. How can I decrypt it? I found the following java code, but it is not working:

String pwd = tools.getPRCrypto().decrypt("waQMEJn+pAdD0RouFGT52KM8jiZf2O2OFbA5D7LiYMk=");
oLog.error("-->" + pwd);

pwd is still same.

Regards, Andre

Correct Answer
January 11, 2019 - 10:06am

It is working now. Password value should look like the following

 String pwd = tools.getPRCrypto().decrypt("              {pr}waQMEJn+pAdD0RouFGT52KM8jiZf2O2OFbA5D7LiYMk=");

 

Andre

Comments

Keep up to date on this post and subscribe to comments

January 11, 2019 - 10:06am

It is working now. Password value should look like the following

 String pwd = tools.getPRCrypto().decrypt("              {pr}waQMEJn+pAdD0RouFGT52KM8jiZf2O2OFbA5D7LiYMk=");

 

Andre

September 12, 2019 - 6:00am
Response to AndreG66

Hi Andre,

I have tried using java in the activity, but the syntax is not working. Can you tell, how to use this syntax?

Thanks