Skip to content

Instantly share code, notes, and snippets.

View drakestone's full-sized avatar

Seokmin, Lee drakestone

  • Seoul, South Korea
View GitHub Profile
const crypto = require('crypto');
// Encrypting...
// WARNING: createCipher() is deprecated
const cipher = crypto.createCipher('aes-256-cbc', '0000');
let alphabetUpperCase = `ABCDEFGHIJKLMNOPQRSTUVWXYZ`;
let cipherText = cipher.update(alphabetUpperCase, 'utf8', 'base64');
console.log(`cipher.update('${alphabetUpperCase}') returns `, `'${cipherText}'`);