Skip to main content
Version: 0.0.1

AES_ENCRYPT

Categories: Cryptography

AES_ENCRYPT

Encrypts a string using AES encryption.

Syntax

AES_ENCRYPT(plaintext varchar, key varchar) → varchar

  • plaintext: The string to be encrypted.
  • key: The key to use to encrypt the plaintext.

Examples

{{< codeheader "AES_ENCRYPT example" >}}

SELECT BASE64(AES_ENCRYPT('Dremio', 'mypassword'))
-- Fad52k2P1Y6rMZ0DBcg8SQ==