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.
plaintext
text
The text to encrypt.
key
text
Text or data field that holds the encryption key. A key can be generated using
vector
text
Text or data field that holds the encryption vector. A proper Vector value can be generated using
encoding with BOM
yes/no
enable or disable encoding with BOM (check the receiving party if BOM is required/expected).