---
sourceDocument: Zurich API Reference
sourceDocumentLink: https://www.servicenow.com/docs/r/zurich/api-reference

 Release :

    - zurich

ft:locale :

    - en-US

ft:publication_title :

    - Zurich API Reference

ft:clusterId :

    - crapiref

bundleId :

    - crapiref

workflow :

    - Creator


---

# GlideEncrypter - Global (deprecated)

# GlideEncrypter - Global (deprecated) {#ariaid-title1}

* Release version: Zurich
* 
* Updated July 31, 2025
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 1 minute to read

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](https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-131Ar2.pdf)). 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](https://www.servicenow.com/docs/access?context=encryption&version=zurich&pubname=zurich-platform-security&ft:locale=en-US) instead for all cryptography operations.
{#GlideEncrypterAPI__ul_lf4_2xm_pfc}  
You can use this API in server scripts in the global scope. The GlideEncrypter class has two constructors:

* GlideEncrypter()
* GlideEncrypter(String key)
{#GlideEncrypterAPI__ul_icd_pnj_1z}

## GlideEncrypter - GlideEncrypter() {#ariaid-title2}

Creates an instance of the GlideEncrypter class using a Key Management Framework (KMF) cryptographic module.
{#GlideEnc-GlideEncrypter__table_ufh_dlj_1z__entry__3}

| Name | Type | Description |
|-|-|-|
| None |   |   |
[Table 1. Parameters]

{#GlideEnc-GlideEncrypter__table_ufh_dlj_1z}  

    var encr = new GlideEncrypter(); 

## GlideEncrypter - GlideEncrypter(String key) {#ariaid-title3}

Creates an instance of the GlideEncrypter class using a given encryption key.
{#GlideEnc-GlideEncrypter_S__table_ogs_flj_1z__entry__3}

| 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. |
[Table 2. Parameters]

{#GlideEnc-GlideEncrypter_S__table_ogs_flj_1z}  

    var encr = new GlideEncrypter(myKey); 

## GlideEncrypter - decrypt(String encryptedString) {#ariaid-title4}

Decrypts a clear string using the KMF-based Advanced Encryption Standard (AES) algorithm.
{#GlideEnc-Decrypt_S__table_x5w_mlj_1z__entry__3}

| Name | Type | Description |
|-|-|-|
| encryptedString | String | String to be decrypted. |
[Table 3. Parameters]

{#GlideEnc-Decrypt_S__table_x5w_mlj_1z} {#GlideEnc-Decrypt_S__table_y5w_mlj_1z__entry__2}

| Type | Description |
|-|-|
| String | Clear text string. |
[Table 4. Returns]

{#GlideEnc-Decrypt_S__table_y5w_mlj_1z}  

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

Output:

    Decrypted string = abcdefg

## GlideEncrypter - encrypt(String clearString) {#ariaid-title5}

Encrypts a clear string using the Key Management Framework (KMF) algorithm.
{#GlideEnc-Encrypt_S__table_bqq_klj_1z__entry__3}

| Name | Type | Description |
|-|-|-|
| clearString | String | String to be encrypted. |
[Table 5. Parameters]

{#GlideEnc-Encrypt_S__table_bqq_klj_1z} {#GlideEnc-Encrypt_S__table_cqq_klj_1z__entry__2}

| Type | Description |
|-|-|
| String | Encrypted string. |
[Table 6. Returns]

{#GlideEnc-Encrypt_S__table_cqq_klj_1z}  
The following example uses the GlideEncrypter() constructor to encrypt a given string:

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

Output:

    Encrypted string = ﷮﷯﷮ febaf83bff31221093d7ffffffffff79﷬ 1﷬﷭BaXD6acaRjZLPUn_bZiZ-w==2c9-PNa0qouYXyBhJtV6-2E31Rm7mWg=﷮﷯ 


