🗝️ fix: update webcrypto algorithm name as aes-256-cbc is unrecognized (#3556)

This commit is contained in:
Danny Avila
2024-08-05 19:15:32 -04:00
committed by GitHub
parent 458dc9c88e
commit 80773d0bce

View File

@@ -3,7 +3,7 @@ require('dotenv').config();
const { webcrypto } = require('node:crypto');
const key = Buffer.from(process.env.CREDS_KEY, 'hex');
const iv = Buffer.from(process.env.CREDS_IV, 'hex');
const algorithm = 'aes-256-cbc';
const algorithm = 'AES-CBC';
async function encrypt(value) {
const cryptoKey = await webcrypto.subtle.importKey('raw', key, { name: algorithm }, false, [