Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- async createPasswordHash(password: string): Promise<string> {
- return this.cryptoService.encryptSHA512(password, PASSWORD_SALT);
- }
- async checkPassword(user: User, password: string): Promise<boolean> {
- return user.passwordHash === await this.createPasswordHash(password);
- }
Add Comment
Please, Sign In to add comment