apache-crypt
Advanced tools
Comparing version 1.2.4 to 1.2.5
{ | ||
"name": "apache-crypt", | ||
"description": "Node.js module for Apache style password encryption using crypt(3).", | ||
"version": "1.2.4", | ||
"version": "1.2.5", | ||
"author": "Gevorg Harutyunyan (http://github.com/gevorg)", | ||
@@ -12,6 +12,6 @@ "maintainers": [ | ||
], | ||
"homepage": "http://github.com/http-auth/apache-crypt", | ||
"homepage": "http://github.com/gevorg/apache-crypt", | ||
"repository": { | ||
"type": "git", | ||
"url": "http://github.com/http-auth/apache-crypt.git" | ||
"url": "http://github.com/gevorg/apache-crypt.git" | ||
}, | ||
@@ -22,3 +22,3 @@ "main": "./src/index.js", | ||
"type": "MIT", | ||
"url": "http://github.com/http-auth/apache-crypt/blob/master/LICENSE" | ||
"url": "http://github.com/gevorg/apache-crypt/blob/master/LICENSE" | ||
} | ||
@@ -28,3 +28,3 @@ ], | ||
"bugs": { | ||
"url": "http://github.com/http-auth/apache-crypt/issues" | ||
"url": "http://github.com/gevorg/apache-crypt/issues" | ||
}, | ||
@@ -37,4 +37,7 @@ "dependencies": { | ||
"eslint": "^6.8.0", | ||
"eslint-config-prettier": "^6.10.0", | ||
"eslint-plugin-node": "^11.0.0", | ||
"mocha": "^7.0.1" | ||
"eslint-plugin-prettier": "^3.1.2", | ||
"mocha": "^7.0.1", | ||
"prettier": "^1.19.1" | ||
}, | ||
@@ -41,0 +44,0 @@ "engines": { |
# apache-crypt | ||
[Node.js](http://nodejs.org/) package for Apache style password encryption using crypt(3). | ||
[![build](https://github.com/http-auth/apache-crypt/workflows/build/badge.svg)](https://github.com/http-auth/apache-crypt/actions?query=workflow%3Abuild) | ||
[![build](https://github.com/gevorg/apache-crypt/workflows/build/badge.svg)](https://github.com/gevorg/apache-crypt/actions/workflows/build.yml) | ||
@@ -11,3 +11,3 @@ ## Installation | ||
```bash | ||
$ git clone git://github.com/http-auth/apache-crypt.git | ||
$ git clone git://github.com/gevorg/apache-crypt.git | ||
``` | ||
@@ -42,36 +42,4 @@ Via [npm](http://npmjs.org/): | ||
## Issues | ||
You can find list of issues using **[this link](http://github.com/http-auth/apache-crypt/issues)**. | ||
## Requirements | ||
- **[Node.js](http://nodejs.org)** - Event-driven I/O server-side JavaScript environment based on V8. | ||
- **[npm](http://npmjs.org)** - Package manager. Installs, publishes and manages node programs. | ||
## Dependencies | ||
- **[unix-crypt-td-js](https://github.com/TimDumol/unix-crypt-td-js/)** - Javascript implementation of the Unix crypt(3) DES-based hash. | ||
## License | ||
The MIT License (MIT) | ||
Copyright (c) Gevorg Harutyunyan | ||
Permission is hereby granted, free of charge, to any person obtaining a copy of | ||
this software and associated documentation files (the "Software"), to deal in | ||
the Software without restriction, including without limitation the rights to | ||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of | ||
the Software, and to permit persons to whom the Software is furnished to do so, | ||
subject to the following conditions: | ||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS | ||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR | ||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER | ||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN | ||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
The MIT License (MIT) |
"use strict"; | ||
// Des module. | ||
const des = require('unix-crypt-td-js'); | ||
const des = require("unix-crypt-td-js"); | ||
// Hash generation string. | ||
const itoa64 = "./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; | ||
const itoa64 = | ||
"./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; | ||
// Salt generation method. | ||
function getSalt() { | ||
return itoa64[ parseInt(Math.random() * 64) ] + | ||
itoa64[ parseInt(Math.random() * 64) ]; | ||
return ( | ||
itoa64[parseInt(Math.random() * 64)] + itoa64[parseInt(Math.random() * 64)] | ||
); | ||
} | ||
@@ -17,3 +19,3 @@ | ||
module.exports = (password, salt) => { | ||
return salt ? des(password, salt) : des(password, getSalt()); | ||
}; | ||
return salt ? des(password, salt) : des(password, getSalt()); | ||
}; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
16
3714
7
43