1
1

More than 3 years have passed since last update.

MySQLでの暗号化関数

Posted at

SELECT TO_BASE64(AES_ENCRYPT('hoge','EA703E7AA1EFDA0064EAA507D9E8AB7E'));
-- SELECT AES_DECRYPT(FROM_BASE64('JrLQBmDIe9pmb4yS0oj4rA=='), 'hoge');
-- SELECT AES_DECRYPT(FROM_BASE64('bNjrqPL0BJ3IrFsueauMbA=='), 'hoge');

SELECT AES_DECRYPT(FROM_BASE64('TTAn0kLBcyPjAisxxO3xSw=='), 'EA703E7AA1EFDA0064EAA507D9E8AB7E', 128);

-- SELECT AES_ENCRYPT(TO_BASE64('alice@kacky.com'), 'hoge');
-- SELECT HEX(AES_ENCRYPT('alice@kacky.com','hoge'));
-- SELECT AES_DECRYPT('U2FsdGVkX1+9zoTboh/6ehJI/89hFnpoHK/nutXVVVfPD8Xdf+EbM59IhwtpUBa+','hoge');

-- SHOW VARIABLES
1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1