From 25e3eadc7347356f93da8f8c8a3207fae2fb497a Mon Sep 17 00:00:00 2001 From: karishmas6 Date: Wed, 30 Oct 2024 21:13:31 +0530 Subject: [PATCH] fix: missing algorithm key --- server/src/utils/auth.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/src/utils/auth.ts b/server/src/utils/auth.ts index e73a4237..f8313df7 100644 --- a/server/src/utils/auth.ts +++ b/server/src/utils/auth.ts @@ -36,7 +36,7 @@ export const encrypt = (text: string): string => { export const decrypt = (encryptedText: string): string => { const [iv, encrypted] = encryptedText.split(':'); - const algorithm = getEnvVariable('ALGORITHM'); + const algorithm = "aes-256-cbc"; const key = Buffer.from(getEnvVariable('ENCRYPTION_KEY'), 'hex'); const decipher = crypto.createDecipheriv(algorithm, key, Buffer.from(iv, 'hex')); let decrypted = decipher.update(encrypted, 'hex', 'utf8');