import { compareSync , genSaltSync , hashSync } from 'bcryptjs' ; export const passwordToHash = ( password ) => { const salt = genSaltSync ( 10 ) ; const hash = hashSync ( password , salt ) ; return hash ; } ; export const checkPassword = ( hash , password ) => { return compareSync ( password , hash ) ; } ;