Hi! Could we please enable some services and cookies to improve your experience and our website?

SQLize | PHPize | SQLtest

Online Sandbox for SQL and PHP: Write, Run, Test, and Share SQL Queries and PHP Code

A A A
Login    Share code      Blog   FAQ
Copy Format Clear
-- Hint: use Ctrl+Enter for SQL autocomplete elect @@session.block_encryption_mode; SET @@session.block_encryption_mode = 'aes-256-cbc'; select @@session.block_encryption_mode; SET @key_str = 'qwer'; SET @init_vector = REPEAT(CHAR(0),16); SET @crypt_str = 'hPxO5YtjequGwvf2WOd9Kg=='; SET @encrypt_str = 'test'; SELECT TO_BASE64(AES_ENCRYPT(@encrypt_str,@key_str,@init_vector)) AS 'ENC'; SELECT AES_DECRYPT(from_base64(@crypt_str),@key_str,@init_vector) AS 'DEC'; SELECT cast(AES_DECRYPT(from_base64(@crypt_str),@key_str,@init_vector) as char) AS 'DEC';

Stuck with a problem? Got Error? Ask AI support!

Copy Clear