logo

NJP

ServiceNow GlideEncrypter API | ServiceNow Decrypt Password | ServiceNow Learn GlideEncrypter Easily

Import · May 18, 2021 · article

In this video, we learn the ServiceNow GlideEncrypter API. ServiceNow Decrypt Password can be done via GlideEncrypter API .IN this video we are gonna decrypt the encrypted password to get the decrypted password.

GlideEncrypter provides methods to encrypt and decrypt strings using the Triple-DES algorithm. The GlideEncrypter class is used in server scripts in the global scope. The GlideEncrypter class has two constructors:

  • GlideEncrypter()
  • GlideEncrypter()

Creates an instance of the GlideEncrypter class using a default (static) encryption key.

Example

var encr = new GlideEncrypter(); 
GlideEncrypter(String key)

Creates an instance of the GlideEncrypter class using a given encryption key. Parameters Name Type Description key String Your encryption key must be exactly 24 characters. A key longer than 24 characters will be truncated.

Example

var encr = new GlideEncrypter(myKey); 
decrypt(String encryptedString)

Decrypts a clear string using the Triple DES algorithm.

Parameters Name Type Description encryptedString String String to be decrypted. Returns Type Description String Clear text string.

Example

var encr = new GlideEncrypter(); 
var clearString = 'abcdefg'; 
var encrString = encr.encrypt(clearString);
var decrString = encr.decrypt(encrString);  
gs.print("Decrypted string = " + decrString);
Decrypted string = abcdefg

Please put it in the comments which you wanna see in the future. If this video is helpful then, please do not forget to like, subscribe and share my youtube channel Technomonk.

View original source

https://www.servicenow.com/community/developer-articles/servicenow-glideencrypter-api-servicenow-decrypt-password/ta-p/2329997