-- Tags: no-fasttest
-- Tag no-fasttest: Depends on OpenSSL

--- aes_encrypt_mysql(string, key, block_mode[, init_vector, AAD])
-- The MySQL-compatitable encryption, only ecb, cbc and ofb modes are supported,
-- just like for MySQL
-- https://dev.mysql.com/doc/refman/8.0/en/encryption-functions.html#function_aes-encrypt
-- https://dev.mysql.com/doc/refman/8.0/en/server-system-variables.html#sysvar_block_encryption_mode
-- Please note that for keys that exceed mode-specific length, keys are folded in a MySQL-specific way,
-- meaning that whole key is used, but effective key length is still determined by mode.
-- when key doesn't exceed the default mode length, ecryption result equals with AES_encypt()

-----------------------------------------------------------------------------------------
-- error cases
-----------------------------------------------------------------------------------------
SELECT aes_encrypt_mysql();


SELECT 'MySQL-compatitable mode, with key folding, no length checks, etc.';


SELECT 'Strict mode without key folding and proper key and iv lengths checks.';

SELECT 'GCM mode with IV';

SELECT 'GCM mode with IV and AAD';

SELECT 'Nullable and LowCardinality';
