Hi all we are using glideencrypter for encrypting the data again we are using the decrypt method for decrypting the same data. It is working fine for combination of text and some special characters but while using with " and / special characters we a

Santhosh23
Tera Expert

Hi all we are using glideencrypter for encrypting the data again we are using the decrypt method for decrypting the same data. It is working fine for combination of text and some special characters but while using with " and / special characters we are getting additional back slashes next to " and / Can anyone please help me on this one

1 ACCEPTED SOLUTION
4 REPLIES 4

Lansford Hazel
Giga Expert

Hi,

GlideEncrypter is used to store sensitive information like passwords. It should definitely work with those characters. 

 

I have tested your problem with the following and got the correct result:

var encrypter = new GlideEncrypter(); 
var clearString = '"/*ab*cd*efg/'; 
var encrString = encrypter.encrypt(clearString);
var decrString = encrypter.decrypt(encrString); 
gs.print("Encrypted string = " + encrString); 
gs.print("Decrypted string = " + decrString);

 

Hi Hazel, Thanks for your reply. I tried with the below parameters and it is not working. can you please check on this.

var encr = new GlideEncrypter();
var clearString = '/a*b"cde'fg'';
var encrString = encr.encrypt(clearString);
gs.print("Value of Encrypted String is" + encrString);
var decrString = encr.decrypt(encrString);
gs.print("Decrypted string = " + decrString);

chetanb
Tera Guru

whats the data type for your password field. try it with password2(as, it uses AES 256 bit secure algo).

you may also check - 

https://community.servicenow.com/community?id=community_question&sys_id=e27047e1db98dbc01dcaf3231f96...

https://servicenowgems.com/2017/08/30/decrypting-password-fields-automatically/

 

 

vinothkumar
Tera Guru

Hello Santhosh,

Refer the below article.

 

https://hi.service-now.com/kb_view.do?sysparm_article=KB0721958