Decrypt password in katalon

Is there any way to Decrypt an encrypted password in Katalon studio. Currently encrypted password is specified in profile and uses

WebUI.setEncryptedText

for entering the password. I am planning to use the same encrypted password in profile for API testing. For making the api calls, i need the session cookie information which is generated using HttpURLConnection using username and password[In this case i can’t use the default katalon based api]

Hi @Mathew.Kuruvila, you can do that programmatically as followed:

import com.kms.katalon.util.CryptoUtil

def originalText = 'mypassword'
println("Original text: ${originalText}")

def encryptedText = CryptoUtil.encode(CryptoUtil.getDefault(originalText))
println("Encrypted text: ${encryptedText}")


def decryptedText = (CryptoUtil.decode(CryptoUtil.getDefault(encryptedText)))
println("Decrypted text: ${decryptedText}")
1 Like

Thank you for the suggestion

@ThanhTo It worked. Thank you