AES ECB Encryption and Decryption Support
Updated
Guided Workflows supports AES ECB (Electronic Codebook) encryption and decryption, allowing you to securely encrypt and decrypt data directly within workflow logic. This capability is useful when integrating with external systems that require AES ECB-based encryption for data exchange.
Dedicated utility functions are available to encrypt sensitive information before transmission and decrypt encrypted values when needed.
Available Functions
Encrypt Data
Use the following function to encrypt a value using AES ECB encryption:
JavaScript
1
encryption_utils.encryptAESECB(key, value)
Show more lines
Parameters
Parameter | Description |
Key | 16-character encryption key used for encryption. |
Value | The value to be encrypted. |
Note:
The encryption key must be exactly 16 characters long.
Use the same key for both encryption and decryption operations.
Example key: 1234567890ABCDEF
Decrypt Data
Use the following function to decrypt an AES ECB-encrypted value:
Parameters
Parameter | Description |
Key | Same 16-character encryption key used for encryption |
encryptedValue | Encrypted value to decrypt |
Important: Decryption succeeds only when the same key used during encryption is provided. If an incorrect key is supplied, the decryption operation fails and returns an error.
Example
The following example demonstrates how to encrypt and decrypt a workflow variable.
Step 1: Encrypt the Data
JavaScript
1
var encryptedValue = encryption_utils.encryptAESECB(
2
"1234567890ABCDEF",
3
workflowVariable
4
);
Show more lines
Step 2: Use the Encrypted Value
Store the encrypted value in a workflow variable or use it in an API request or integration payload.
Step 3: Decrypt the Data
JavaScript
1
var decryptedValue = encryption_utils.decryptAESECB(
2
"1234567890ABCDEF",
3
encryptedValue
4
);
Show more lines
Result
When the same encryption key is used for both operations, the decrypted value matches the original input value.