mariadb 썸네일형 리스트형 MariaDB AES Encrypt, Decrypt 1. AES로 암호화할 컬럼은 BLOB으로 생성 create table encrypt_test_table ( encrypt_test_id bigint(20) not null auto_increment, encrypted blob not null, primary key (encrypt_test_id) ); 2. AES_ENCRYPT insert into encrypt_test_table (encrypted) values (AES_ENCRYPT('message', SHA2('secret_key', 256))); 3. AES_DECRYPT select AES_DECRYPT(encrypted, SHA2('secret_key', 256)) as decrypted from encrypt_test_table; 이전 1 다음