---
sourceDocument: Brazil Platform security
sourceDocumentLink: https://www.servicenow.com/docs/r/platform-security

 Release :

    - brazil

ft:locale :

    - en-US

ft:publication_title :

    - Brazil Platform security

ft:clusterId :

    - psec

bundleId :

    - psec

workflow :

    - Platform


---

# FlowKMFEncrypter API

# FlowKMFEncrypter API {#ariaid-title1}

Release version: Brazil  
Updated September 10, 2026  
![](https://www.servicenow.com/docs/portal-asset/ico-clock) 1 minute to read  
The FlowKMFEncrypter API provides secure encryption and decryption for ServiceNow Flow Actions, using the Key Management Framework (KMF) crypto operations.
FlowKMFEncrypter is a ServiceNow Script Include that provides secure encryption and decryption capabilities for Flow Actions using the Key Management Framework (KMF) crypto APIs. This API replaces the deprecated GlideEncrypter and
work with Flow Engine while adhering to Module Access Policy (MAP) requirements.  
Note:  
FlowKMFEncrypter works only in Flow Engine use cases. It does not work in script-layer applications.

## How it works {#flowkmfencrypter-api__flowkmf-how-it-works}

The FlowKMFEncrypter API uses the AES algorithm with symmetric key wrapping and unwrapping
operations. The Flow Engine Crypto Module supplies the encryption key. This approach is
used to securely handle sensitive data, such as credentials and passwords, within Flow
Actions.

## FlowKMFEncrypter() - constructor {#flowkmfencrypter-api__flowkmf-constructor}

Creates a new instance of the FlowKMFEncrypter class. The constructor initializes the
encrypter with the necessary KMF crypto operations configuration.

Syntax
:

        new FlowKMFEncrypter()


Parameters
:   None

## encrypt(input) {#flowkmfencrypter-api__flowkmf-encrypt}

Encrypts plaintext data using AES symmetric encryption.

Syntax
:

        encrypt(input: String): String


Parameters
:
    {#flowkmfencrypter-api__table_mk4_ymf_rjc__entry__3}

    | Name | Type | Description |
    |-|-|-|
    | input | String | The plaintext string to encrypt. |
    [ ]

    {#flowkmfencrypter-api__table_mk4_ymf_rjc}

Returns
:
    {#flowkmfencrypter-api__table_rrd_zmf_rjc__entry__2}

    | Type | Description |
    |-|-|
    | String | An encrypted string in KMF-compatible format that can be securely stored and later decrypted. |
    [ ]

{#flowkmfencrypter-api__table_rrd_zmf_rjc}  

    var encrypter = new FlowKMFEncrypter();
    var plainString = "mySecurePassword123";
    var encryptedString = encrypter.encrypt(plainString);

## decrypt(input) {#flowkmfencrypter-api__flowkmf-decrypt}

Decrypts encrypted data back to plaintext using AES symmetric decryption.

Syntax
:

        decrypt(input: String): String


Parameters
:
    {#flowkmfencrypter-api__table_esl_bnf_rjc__entry__3}

    | Name | Type | Description |
    |-|-|-|
    | input | String | The encrypted string in KMF-compatible format to decrypt. |
    [ ]

    {#flowkmfencrypter-api__table_esl_bnf_rjc}

Returns
:
    {#flowkmfencrypter-api__table_wwx_bnf_rjc__entry__2}

    | Type | Description |
    |-|-|
    | String | The decrypted plaintext string. |
    [ ]

{#flowkmfencrypter-api__table_wwx_bnf_rjc}  

    var encrypter = new FlowKMFEncrypter();
    var encryptedString = "<encrypted value>";
    var decryptedString = encrypter.decrypt(encryptedString);

* **[FlowKMFEncrypter in a Flow Action](https://www.servicenow.com/docs/wQlW469mlq3p7W2I_AhfUA)**   
  Resolve the "undefined is not a function" error that occurs when a Flow Action calls the FlowKMFEncrypter API, by allowing the operation in the Restricted Caller Access Privilege record.

