@@ -0,0 +1,7 @@
|
||||
export function hash(pwd: string) : Promise<string> {
|
||||
return Bun.password.hash(pwd)
|
||||
}
|
||||
|
||||
export async function verify(pwd: string, hash: string) : Promise<boolean> {
|
||||
return Bun.password.verify(pwd, hash).catch(() => false)
|
||||
}
|
||||
Reference in New Issue
Block a user