mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-17 08:50:15 +01:00
🗝️ fix: update webcrypto algorithm name as aes-256-cbc is unrecognized (#3556)
This commit is contained in:
parent
458dc9c88e
commit
80773d0bce
1 changed files with 1 additions and 1 deletions
|
|
@ -3,7 +3,7 @@ require('dotenv').config();
|
||||||
const { webcrypto } = require('node:crypto');
|
const { webcrypto } = require('node:crypto');
|
||||||
const key = Buffer.from(process.env.CREDS_KEY, 'hex');
|
const key = Buffer.from(process.env.CREDS_KEY, 'hex');
|
||||||
const iv = Buffer.from(process.env.CREDS_IV, 'hex');
|
const iv = Buffer.from(process.env.CREDS_IV, 'hex');
|
||||||
const algorithm = 'aes-256-cbc';
|
const algorithm = 'AES-CBC';
|
||||||
|
|
||||||
async function encrypt(value) {
|
async function encrypt(value) {
|
||||||
const cryptoKey = await webcrypto.subtle.importKey('raw', key, { name: algorithm }, false, [
|
const cryptoKey = await webcrypto.subtle.importKey('raw', key, { name: algorithm }, false, [
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue