Encrypt 썸네일형 리스트형 Node.js RSA Encryption, Decryption 1. Private Key & Public Key 생성 // generate rsa private.key openssl genrsa -out private.key 2048 // generate rsa public.key openssl rsa -in private.key -out public.key -pubout 2. Node.js crypto를 사용한 RSA Encryption, Decryption const crypto = require('crypto'); const rsaPrivKey = `-----BEGIN RSA PRIVATE KEY----- MIIEogIBAAKCAQEAxmtuWLe0poapjNrP7wyhsPgGCikuQRU7nI+0sj9QBexrt2Mt kVwhXdXevHXcR9sA90Bkrs.. 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 다음