fix: hashPassword calls not working due to util file not matching function call name

This commit is contained in:
SauceyRed 2025-07-18 03:49:20 +02:00
parent 0c4d42f3c1
commit 8d53b2765f
Signed by: sauceyred
GPG key ID: 2BF92EB6D8A5CCA7

7
utils/hashPassword.ts Normal file
View file

@ -0,0 +1,7 @@
export default async (password: string) => {
const encodedPass = new TextEncoder().encode(password);
const hashBuffer = await crypto.subtle.digest("SHA-384", encodedPass);
const hashArray = Array.from(new Uint8Array(hashBuffer));
const hashedPass = hashArray.map((b) => b.toString(16).padStart(2, "0")).join("");
return hashedPass;
}