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 key
if the wrong key is used and invalid initialization vector
if the wrong vector is used.
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).