Crypto 썸네일형 리스트형 Node.js AES Encryption, Decryption const crypto = require('crypto'); const algorithm = 'aes-128-cbc'; const secretKey = 'abcdefghijklmnop'; const iv = '00000000000000000000000000000000'; const encrypt = (message) => { const cipher = crypto.createCipheriv(algorithm, Buffer.from(secretKey), Buffer.from(iv, 'hex')); const encrypted = cipher.update(message); return Buffer.concat([encrypted, cipher.final()]).toString('hex'); }; const .. 이전 1 다음