読者です 読者をやめる 読者になる 読者になる

MySQLで暗号化・複合化

参照URL http://blog.graffiti-web.org/archives/cat_system.php

SELECT HEX(AES_ENCRYPT('hogehoge', 'abcdeabcdeabcdea')) AS encrypted;
+----------------------------------+
| encrypted                        |
+----------------------------------+
| 2BF77B6863989EAD599D86650A046586 |
+----------------------------------+

mysql> SELECT AES_DECRYPT(UNHEX('2BF77B6863989EAD599D86650A046586'), 'abcdeabcdeabcdea') AS decrypted;