mirror of
https://github.com/BradNut/boredgame
synced 2025-09-08 17:40:22 +00:00
10 lines
266 B
TypeScript
10 lines
266 B
TypeScript
import { Argon2id } from "oslo/password";
|
|
|
|
export async function hash(value: string) {
|
|
const argon2 = new Argon2id()
|
|
return argon2.hash(value);
|
|
}
|
|
|
|
export function verify(hashedValue: string, value: string) {
|
|
return new Argon2id().verify(hashedValue, value);
|
|
}
|