mirror of
https://github.com/IT4Change/gradido.git
synced 2026-02-06 09:56:05 +00:00
add comment for more code clarity
This commit is contained in:
parent
8517b89fb0
commit
4d383a4346
@ -5,7 +5,7 @@ import { getUserCryptographicSalt, SecretKeyCryptographyCreateKey } from './Encr
|
||||
|
||||
export const encryptPassword = async (dbUser: User, password: string): Promise<bigint> => {
|
||||
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
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user