mirror of
https://github.com/BradNut/boredgame
synced 2025-09-08 17:40:22 +00:00
13 lines
303 B
TypeScript
13 lines
303 B
TypeScript
import { injectable } from '@needle-di/core';
|
|
import { hash, verify } from 'argon2';
|
|
|
|
@injectable()
|
|
export class HashingService {
|
|
hash(data: string): Promise<string> {
|
|
return hash(data);
|
|
}
|
|
|
|
compare(data: string, encrypted: string): Promise<boolean> {
|
|
return verify(encrypted, data);
|
|
}
|
|
}
|