Skip to content

Latest commit

 

History

History
21 lines (15 loc) · 559 Bytes

File metadata and controls

21 lines (15 loc) · 559 Bytes
description
Encrypts a string using AES encryption.

AES_ENCRYPT

Syntax

AES_ENCRYPT(plaintext varchar, key varchar) → varchar

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

Examples

{% code title="AES_ENCRYPT example" %}

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

{% endcode %}