First Commit

main
Cemal Odabasioglu 2024-01-25 16:28:20 +01:00
commit f474f42fa3
3 changed files with 77 additions and 0 deletions

11
index.js Normal file
View File

@ -0,0 +1,11 @@
//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 };

44
package-lock.json generated Normal file
View File

@ -0,0 +1,44 @@
{
"name": "iut-encrypt",
"version": "1.0.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "iut-encrypt",
"version": "1.0.0",
"license": "ISC",
"dependencies": {
"sha1": "^1.1.1"
}
},
"node_modules/charenc": {
"version": "0.0.2",
"resolved": "https://registry.npmjs.org/charenc/-/charenc-0.0.2.tgz",
"integrity": "sha512-yrLQ/yVUFXkzg7EDQsPieE/53+0RlaWTs+wBrvW36cyilJ2SaDWfl4Yj7MtLTXleV9uEKefbAGUPv2/iWSooRA==",
"engines": {
"node": "*"
}
},
"node_modules/crypt": {
"version": "0.0.2",
"resolved": "https://registry.npmjs.org/crypt/-/crypt-0.0.2.tgz",
"integrity": "sha512-mCxBlsHFYh9C+HVpiEacem8FEBnMXgU9gy4zmNC+SXAZNB/1idgp/aulFJ4FgCi7GPEVbfyng092GqL2k2rmow==",
"engines": {
"node": "*"
}
},
"node_modules/sha1": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/sha1/-/sha1-1.1.1.tgz",
"integrity": "sha512-dZBS6OrMjtgVkopB1Gmo4RQCDKiZsqcpAQpkV/aaj+FCrCg8r4I4qMkDPQjBgLIxlmu9k4nUbWq6ohXahOneYA==",
"dependencies": {
"charenc": ">= 0.0.1",
"crypt": ">= 0.0.1"
},
"engines": {
"node": "*"
}
}
}
}

22
package.json Normal file
View File

@ -0,0 +1,22 @@
{
"name": "iut-encrypt-cemal",
"version": "1.0.0",
"description": "sha1 encrypter",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "https://git.odabasioglu.fr/Cemal/iut-encrypt"
},
"keywords": [
"sha1"
],
"author": "Cemal",
"license": "ISC",
"dependencies": {
"sha1": "^1.1.1"
},
"devDependencies": {}
}