AesEncrypt

The AesEncrypt() function generates a base64 encoded ciphertext based on the given plaintext, key and initialization vector.

This function is NOT SQL compatible. For more information about SQL compatibility, see our documentation.

Returns a base64 encoded ciphertext Returns invalid keyif the wrong key is used and invalid initialization vector if the wrong vector is used.

Syntax

AesEncrypt(plaintext, key, vector)

AesEncrypt(text, key, vector) => +8oDxXf+w91SR+/AkjpdcLSbygah8m3OQdapwnkAjvY=

AesEncrypt(plaintext, key, vector, encoding with BOM)

AesEncrypt(text, key, vector, false) => e3ieQNh8nKH/pHImo+JQmZvr+rhSGn4WHQJyTBmPCbA=

Parameters

Name
Type
Required
Description

plaintext

text

☑️

The text to encrypt.

key

text

☑️

Text or data field that holds the encryption key. A key can be generated using AesKey()

vector

text

☑️

Text or data field that holds the encryption vector. A proper Vector value can be generated using AesIv()

encoding with BOM

yes/no

enable or disable encoding with BOM (check the receiving party if BOM is required/expected).

Last updated