---
sourceDocument: Xanadu API Reference
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/xanadu/api-reference

 Release :

    - xanadu

ft:locale :

    - en-US

ft:publication_title :

    - Xanadu API Reference

ft:clusterId :

    - crapiref

bundleId :

    - crapiref

workflow :

    - Creator


---

# GlideEncrypter - Global (deprecated)

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

* Release version: Xanadu
* 
* Updated August 1, 2024
* 
* ![](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 Triple DES algorithm.  
Note:  
The GlideEncrypter API uses the three-key Triple DES encryption standard which [NIST 800-131A Rev 2](https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-131Ar2.pdf) has recommended against using to encrypt data after 2023. Please take a moment to review the information below.

* Starting with the Xanadu family release, the GlideEncrypter API is not recommended for use, as this API is deprecated according to NIST guidelines. With the Zurich release, the GlideEncrypter API will be upgraded to automatically use Key Management Framework.
* New instance installations and re-installations using the GlideEncrypter API in the ServiceNow AI Platform will not be permitted in the Zurich release planned for September 2025. Use the [Instance Scan](https://www.servicenow.com/docs/access?context=hs-landing-page&version=xanadu&pubname=xanadu-platform-administration&ft:locale=en-US) to identify where GlideEncrypter is used on your instance. Find this tool on your instance by navigating to Instance ScanSuitesGlideEncrypter.
* Review the following Knowledge Base article for migration guidance to the applicable replacement solution based on your current use case: [Alternatives to deprecated GlideEncrypter APIs](https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB1320986).

{#GlideEncrypterAPI__ul_b3p_rfz_fyb}If the GlideEncrypter API is no longer used on your instance, you may deprecate 3DES. For details, see [Prepare your instance for GlideEncrypter deprecation](https://www.servicenow.com/docs/access?context=check-3des&version=xanadu&pubname=xanadu-platform-security&ft:locale=en-US).  
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 default (static) encryption
key.
{#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 | Your 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 Triple DES 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 Triple DES 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}  

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

Output:

    Encrypted string = 3wjpvKtUIi4=

*[\>]: and then


