From 4d383a434661bdb7743db2420a52ac8e3a55d2d2 Mon Sep 17 00:00:00 2001 From: einhornimmond Date: Thu, 9 Jan 2025 12:27:46 +0100 Subject: [PATCH] add comment for more code clarity --- backend/src/password/PasswordEncryptor.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/password/PasswordEncryptor.ts b/backend/src/password/PasswordEncryptor.ts index 1aa740672..1ee0a68a8 100644 --- a/backend/src/password/PasswordEncryptor.ts +++ b/backend/src/password/PasswordEncryptor.ts @@ -5,7 +5,7 @@ import { getUserCryptographicSalt, SecretKeyCryptographyCreateKey } from './Encr export const encryptPassword = async (dbUser: User, password: string): Promise => { const salt = getUserCryptographicSalt(dbUser) - const keyBuffer = await SecretKeyCryptographyCreateKey(salt, password) // return short and long hash + const keyBuffer: Uint8Array[] = await SecretKeyCryptographyCreateKey(salt, password) // returns Uint8Array[short hash, long hash] const passwordHash = Buffer.from(keyBuffer[0]).readBigUInt64LE() return passwordHash }