import bcrypt from 'bcrypt' ; import { User } from '../../modules/user/user.entity' ; export function hashPassword ( password ) { return bcrypt . hash ( password , 10 ) ; } export function comparePassword ( user , password ) { return bcrypt . compare ( password , user . password ) ; }