Skip to content

Commit

Permalink
BUGFIX
Browse files Browse the repository at this point in the history
  • Loading branch information
Arcangelo Vicedomini committed Apr 12, 2017
1 parent 91bf921 commit 694fbc3
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions utils.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
const crypto = require('crypto');
const hash = crypto.createHash('sha256');

exports.validPassword = (user, password) => {
return exports.passwordChipher(password) == user.password;
};

exports.passwordChipher = (password) => {
return hash.digest(password);
return crypto.createHash('sha256').digest(password);
};

exports.getSingleResult = (results) => {
Expand Down

0 comments on commit 694fbc3

Please sign in to comment.