removed some chars

This commit is contained in:
2024-06-02 17:30:46 -04:00
parent 5a167466e3
commit 0e243efc82
+2 -2
View File
@@ -9,9 +9,9 @@ function generateKey(password, salt) {
// Function to encrypt a message // Function to encrypt a message
export function encryptInitEnc(buffer, password) { export function encryptInitEnc(buffer, password) {
const salt = randomBytes(16); // Generate a new salt const salt = randomBytes(16);
const key = generateKey(password, salt); const key = generateKey(password, salt);
const iv = randomBytes(16); // Initialization vector const iv = randomBytes(16);
const cipher = createCipheriv('aes-256-cbc', key, iv); const cipher = createCipheriv('aes-256-cbc', key, iv);
let encrypted = Buffer.concat([cipher.update(buffer), cipher.final()]); let encrypted = Buffer.concat([cipher.update(buffer), cipher.final()]);
return { return {