Import files
ci/woodpecker/manual/test Pipeline failed

This commit is contained in:
2024-05-14 14:37:32 +02:00
commit 9465e5f05a
8 changed files with 137 additions and 0 deletions
+10
View File
@@ -0,0 +1,10 @@
import {Result} from 'result'
export type JWT = `${string}.${string}.${string}`
export function create() : Result<JWT> {
throw "todo"
}
export function verify() : boolean {
throw "todo"
}
+7
View File
@@ -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)
}