import bcrypt from 'bcrypt'; const SALT_ROUNDS = 10; export class Password { static hash(password: string): Promise { return bcrypt.hash(password, SALT_ROUNDS) } static validate(password: string, hash: string): Promise { return bcrypt.compare(password, hash) } }