From 694fbc3b265cbdef6492fcc2ff1d3eb9c6bf4892 Mon Sep 17 00:00:00 2001 From: Arcangelo Vicedomini Date: Wed, 12 Apr 2017 21:26:49 +0200 Subject: [PATCH] BUGFIX https://github.com/nodejs/node-v0.x-archive/issues/749 --- utils.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/utils.js b/utils.js index 2bbbed6..7aae650 100644 --- a/utils.js +++ b/utils.js @@ -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) => {