Skip to content

Instantly share code, notes, and snippets.

@prateek-mt
prateek-mt / crypto.js
Created December 2, 2022 09:42
a simple encryption and decryption code in JS
// A node demo program for creating the ECDH
// Importing the crypto module
const crypto = require('crypto');
// import crypto from 'crypto'
// Initializing the algorithm
const algorithm = 'aes-256-cbc';
// Initializing the key
const key = Buffer.from("48b1db4df28757ba48b1db4df28757ba");