7 lines
258 B
JavaScript
7 lines
258 B
JavaScript
import crypto from "crypto";
|
|
|
|
const encryptionKey = crypto.randomBytes(32).toString("hex"); // 32 bytes (256-bit)
|
|
const iv = crypto.randomBytes(16).toString("hex"); // 16 bytes (128-bit)
|
|
|
|
console.log("Encryption Key:", encryptionKey);
|
|
console.log("IV:", iv); |