!!...MySQL&MariaDB
[MySQL] MySQL 암호화 / 복호화 샘플
qnfmfmd_
2015. 6. 15. 13:12
BIG
----------------------------------------------------------------------------
암호화
SELECT HEX(AES_ENCRYPT('문자열', '암호화 키'))
ex) SELECT HEX(AES_ENCRYPT('123-1234-1234', '1234'))
복호화
SELECT AES_DECRYPT(UNHEX('암호화된 문자열'), '암호화 키')
ex)SELECT AES_DECRYPT(UNHEX('7524384B50AE8709C30C2D4F54DE2D6F'), '1234')
----------------------------------------------------------------------------
LIST