Encrypted text in Custom Keyword

I am passing a password to a custom keyword which works fine when I pass it as plain text.
If I pass an encrypted password to the keyword instead, can anyone help with how to use it within the function?
Thanks in advance

Hey @9326-Richard

could you mention why you need encrypted text in CustomKeyword? If there is an actual user scenario, We can use WebUI.setEncryptedText() method apart from this you should not access encypted content

Aim of custom keyword is to use some sensitive information inside test case

Hi Rudra,
i am using javamail add on to retrieve the validation link from an email that the website has sent. I have written the keyword such that when you call it you can pass it the email account and password so I can use the same function for multiple scenarios and I would prefer to send it an encrypted password (I also pass the subject of the email I am interested in and a regex for the part of the email I want returned).

Hello Richard,
take a look at this tread :

there are 2 ways how to encrypt text, both are described there

I think with above solution, User can still retrieve password using debug point however what you need is something here - https://stackoverflow.com/questions/5183651/connect-to-gmail-using-imap-and-javamail-with-encrypted-password

Many thanks for the pointers, I will give it a go in the morning!