11 lines
271 B
JavaScript
11 lines
271 B
JavaScript
|
//NPM package that will have encrypt method with sha1
|
||
|
const sha1 = require('sha1');
|
||
|
function encryptSha1(password) {
|
||
|
return sha1(password);
|
||
|
}
|
||
|
|
||
|
function compareSha1(password, hash) {
|
||
|
return sha1(password) === hash;
|
||
|
}
|
||
|
|
||
|
module.exports = { encryptSha1, compareSha1 };
|