GlideEncrypter - Global \(deprecated\)

concept brazil Updated Sep 10, 2026 1 min read GlideEncrypterAPI.md
Raw file servicenow.com

The GlideEncrypter API provides methods to encrypt and decrypt strings using the Key Management Framework (KMF).

Important: The GlideEncrypter API no longer supports Triple Data Encryption Standard (3DES) due to NIST guidelines (see NIST 800-131A Rev 2). As a result, the following changes were implemented in the Zurich release:

  • For existing instances that upgrade to the Zurich release, the GlideEncrypter API is available for use but has been updated to automatically use the Key Management Framework (KMF) algorithm.
  • For all new instances created starting with the Zurich release, the GlideEncrypter API is no longer supported. Directly use the Key Management Framework instead for all cryptography operations.

You can use this API in server scripts in the global scope. The GlideEncrypter class has two constructors:

  • GlideEncrypter()
  • GlideEncrypter(String key)

Parent Topic:Server API reference

GlideEncrypter - GlideEncrypter()

Creates an instance of the GlideEncrypter class using a Key Management Framework (KMF) cryptographic module.

Name Type Description
None
JavaScript
var encr = new GlideEncrypter();

GlideEncrypter - GlideEncrypter(String key)

Creates an instance of the GlideEncrypter class using a given encryption key.

Name

Type

Description

key

String

Customer key to be used for encrypting or decrypting using Triple DES algorithm. Encryption key must be exactly 24 characters. A key longer than 24 characters will be truncated.

``` var encr = new GlideEncrypter(myKey); ```

GlideEncrypter - decrypt(String encryptedString)

Decrypts a clear string using the KMF-based Advanced Encryption Standard (AES) algorithm.

Name Type Description
encryptedString String String to be decrypted.
Type Description
String Clear text string.
JavaScript
var encr = new GlideEncrypter(); var clearString = 'abcdefg'; var encrString = encr.encrypt(clearString);var decrString = encr.decrypt(encrString);  gs.print("Decrypted string = " + decrString);

Output:

Text
Decrypted string = abcdefg

GlideEncrypter - encrypt(String clearString)

Encrypts a clear string using the Key Management Framework (KMF) algorithm.

Name Type Description
clearString String String to be encrypted.
Type Description
String Encrypted string.

The following example uses the GlideEncrypter() constructor to encrypt a given string:

JavaScript
var encr = new GlideEncrypter(); var clearString = 'abcdefg'; var encrString = encr.encrypt(clearString); gs.print("Encrypted string = " + encrString);

Output:

Text
Encrypted string = ﷮﷯﷮ febaf83bff31221093d7ffffffffff79﷬ 1﷬﷭BaXD6acaRjZLPUn_bZiZ-w==2c9-PNa0qouYXyBhJtV6-2E31Rm7mWg=﷮﷯
Search documentation
Search document titles and file paths on the brazil branch