Said
7 years agoContributor
Base64 decode password
Hi All,
I have a a project property that has a password that I use in a request. In the password field of the request I use syntax below to get password in request:
${#Project#servicePwd}
This works perfect. Now I would like to use base64 encoded password and decode this password with syntax below:
${=java.util.Base64.getDecoder().decode(${#Project#servicePwd})}
But When I use this syntax I get invalid userid / password error. What am I doning wrong? How can I use encoded passwords?
Thanks in advance!
I think you could get what you want with this snippet of code:
${= new String (context.testCase.testSuite.project.getPropertyValue("servicePwd").decodeBase64() )}