From e83fe422683467389066d8da6df34321f546fc29 Mon Sep 17 00:00:00 2001 From: Zichao Lin Date: Sun, 21 Jul 2024 21:42:19 +0800 Subject: [PATCH] fix(utils): update hash keys --- src/main/utils.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/utils.js b/src/main/utils.js index 3eed815..a5b7ee7 100644 --- a/src/main/utils.js +++ b/src/main/utils.js @@ -142,12 +142,12 @@ const readJSON = async (dataPath, name) => { } const hash = (data, type = 'sha256') => { - const hmac = crypto.createHmac(type, 'hk4e') + const hmac = crypto.createHmac(type, 'nap') hmac.update(data) return hmac.digest('hex') } -const scryptKey = crypto.scryptSync(userPath, 'hk4e', 24) +const scryptKey = crypto.scryptSync(userPath, 'nap', 24) const cipherAes = (data) => { const algorithm = 'aes-192-cbc' const iv = Buffer.alloc(16, 0)