GlideEncrypter - Global (deprecated)

  • 릴리스 버전: Australia
  • 업데이트 날짜 2026년 03월 12일
  • 소요 시간: 4분
  • The GlideEncrypter API provides methods to encrypt and decrypt strings using the Key Management Framework (KMF).

    중요사항:
    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)

    GlideEncrypter - GlideEncrypter()

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

    표 1. Parameters
    Name Type Description
    None
    var encr = new GlideEncrypter(); 

    GlideEncrypter - GlideEncrypter(String key)

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

    표 2. Parameters
    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.

    표 3. Parameters
    Name Type Description
    encryptedString String String to be decrypted.
    표 4. Returns
    Type Description
    String Clear text string.
    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)

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

    표 5. Parameters
    Name Type Description
    clearString String String to be encrypted.
    표 6. Returns
    Type Description
    String Encrypted string.

    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=﷮﷯