iut-encrypt/index.js

11 lines
271 B
JavaScript
Raw Normal View History

2024-01-25 15:28:20 +00:00
//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 };