Categories: Cryptography
AES_ENCRYPT
Encrypts a string using AES encryption. Deprecated. Dremio recommends ENCRYPT for improved security and support for modern cipher modes. Ciphertext created with AES_ENCRYPT can be decrypted with DECRYPT in AES-ECB mode and does not need to be recreated with ENCRYPT unless a stronger cipher mode is required.
Syntax
AES_ENCRYPT(plaintext varchar, key varchar) → varchar
- plaintext: The string to be encrypted.
- key: The key to use to encrypt the plaintext. Must be 16, 24, or 32 characters.
Examples
AES_ENCRYPT exampleSELECT BASE64(AES_ENCRYPT('Dremio', 'mypassword123456'))
-- UvicDn/xiUDmfSE+KYjjyw==