
var bCrypt = require('bcrypt');

exports.createHash = function(password){
    return bCrypt.hashSync(password, bCrypt.genSaltSync(10), null);
}

exports.validatePassword = function(user, password){
      return bCrypt.compareSync(password, user.password);
    }