website refactor
This commit is contained in:
@@ -5,7 +5,7 @@ import { PasswordHash } from '../value-objects/PasswordHash';
|
||||
*
|
||||
* Service for password hashing and verification.
|
||||
*/
|
||||
export interface IPasswordHashingService {
|
||||
export interface PasswordHashingService {
|
||||
hash(plain: string): Promise<string>;
|
||||
verify(plain: string, hash: string): Promise<boolean>;
|
||||
}
|
||||
@@ -13,7 +13,7 @@ export interface IPasswordHashingService {
|
||||
/**
|
||||
* Implementation using bcrypt via PasswordHash VO.
|
||||
*/
|
||||
export class PasswordHashingService implements IPasswordHashingService {
|
||||
export class PasswordHashingService implements PasswordHashingService {
|
||||
async hash(plain: string): Promise<string> {
|
||||
const passwordHash = await PasswordHash.create(plain);
|
||||
return passwordHash.value;
|
||||
|
||||
Reference in New Issue
Block a user