import { hash, compare } from "bcrypt"; import { EncryptionServiceInterface } from "./encryption.interface"; export class EncryptionService implements EncryptionServiceInterface { async hashPassword(password: string): Promise { const hashedPassword = await hash(password, 10); return hashedPassword; } async comparePassowrd(password: string, hash: string): Promise { return await compare(password, hash); } }