Socket
Socket
Sign inDemoInstall

pasteurize

Package Overview
Dependencies
0
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.0 to 2.0.0

.nyc_output/02f55d3a9025c8a1a7955cac75f0778e.json

34

package.json
{
"name": "pasteurize",
"version": "1.0.0",
"version": "2.0.0",
"description": "A secure password hashing and verification module",
"main": "src/pasteurize.js",
"main": "dist/pasteurize.js",
"engines": {
"node": ">=0.12.0"
"node": ">=4.0"
},
"scripts": {
"lint": "node_modules/.bin/eslint src",
"test": "node_modules/.bin/tap --cov --reporter=spec test/**/*.test.js",
"precoverage": "node_modules/.bin/rimraf coverage",
"coverage": "node_modules/.bin/tap --coverage-report=lcov"
"lint": "eslint src/**/*.ts",
"pretest": "rimraf dist && tsc",
"test": "nyc --cache ava --tap | tap-nyan",
"posttest": "nyc report --check-coverage --statements=90",
"coverage:report": "nyc report --reporter=lcov && opener ./coverage/lcov-report/index.html",
"pretest-ci": "rimraf dist && tsc",
"test-ci": "nyc --cache ava --verbose",
"posttest-ci": "nyc report --check-coverage --statements=90",
"prebuild": "npm run lint && npm run test && rimraf dist",
"build": "tsc -p tsconfig.build.json --sourceMap false -d",
"prepublish": "npm run build"
},

@@ -32,7 +39,16 @@ "repository": {

"homepage": "https://github.com/zefferus/pasteurize#readme",
"typings": "dist/pasteurize.d.ts",
"devDependencies": {
"eslint": "^2.4.0",
"@types/node": "^6.0.50",
"ava": "^0.17.0",
"coveralls": "^2.11.15",
"eslint": "^3.10.2",
"nyc": "^10.0.0",
"opener": "^1.4.2",
"rimraf": "^2.5.2",
"tap": "^5.7.0"
"tap-nyan": "^1.1.0",
"tap-xunit": "^1.4.0",
"typescript": "^2.1.1",
"typescript-eslint-parser": "^1.0.0"
}
}

@@ -5,4 +5,6 @@ # Pasteurize

[![Build Status](https://travis-ci.org/zefferus/pasteurize.svg?branch=master)](https://travis-ci.org/zefferus/pasteurize)![Current Version](https://img.shields.io/npm/v/pasteurize.svg)
[![Build Status](https://travis-ci.org/zefferus/pasteurize.svg?branch=master)](https://travis-ci.org/zefferus/pasteurize) [![Coverage Status](https://coveralls.io/repos/github/zefferus/pasteurize/badge.svg?branch=master)](https://coveralls.io/github/zefferus/pasteurize?branch=master) ![Current Version](https://img.shields.io/npm/v/pasteurize.svg)
Development on **Pasteurize** is sponsored by [Sparo Labs](http://www.sparolabs.com/).
**Pasteurize** helps you create and verify secure password hashes by wrapping the built-in functions of Node.js' [`Crypto` module](https://nodejs.org/dist/latest/docs/api/crypto.html) and making it easier to use. **Pasteurize** uses cryptographically strong pseudo-random data for hash salts and the highly-secure PBKDF2 hashing function to generate a secure one-way hash of your user's password so you do not have to worry about accidentally leaking the original password.

@@ -22,3 +24,3 @@

### new Pasteurize(keyLength, saltLength, iterations, digest)
### `new Pasteurize(keyLength, saltLength, iterations, digest)`

@@ -44,3 +46,3 @@ Creates a new `Pasteurize` object where:

```javascript
const Pasteurize = require('pasteurize');
const Pasteurize = require('pasteurize').Pasteurize;
const pasteurize = new Pasteurize(64, 256, 100000, 'sha512');

@@ -50,3 +52,3 @@ ```

### `pasteurize.hashPassword(password, callback)`
### `pasteurize.hashPassword(password, [callback])`

@@ -56,6 +58,8 @@ Asyncronously generates a password hash based on the initiating values of `Pasteurize` where:

- `password` - The password string to hash.
- `callback` - The callback method when password hashing is complete or failed with signature `function (err, hashedPassword)` where:
- `callback` - The optional callback method when password hashing is complete or failed with signature `function (err, [hashedPassword])` where:
- `err` - Any error condition while creating the password hash.
- `hashedPassword` - The resulting password hash.
If `callback` is not provided, this method returns a `Promise`.
```javascript

@@ -84,3 +88,3 @@ pasteurize.hashPassword('password1', (err, hash) => {

### `pasteurize.verifyPassword(password, hashedPassword, callback)`
### `pasteurize.verifyPassword(password, hashedPassword, [callback])`

@@ -91,6 +95,8 @@ Asynchronously verifies a password against a given hash where:

- `hashedPassword` - The hashed password against which to verify the password.
- `callback` - The callback method when password verification is complete or failed with signature `function(err, verified)` where:
- `callback` - The optional callback method when password verification is complete or failed with signature `function(err, [verified])` where:
- `err` - Any error condition while verifying the password hash.
- `verified` - Whether the password and the hash match.
If `callback` is not provided, this method returns a `Promise`.
```javascript

@@ -97,0 +103,0 @@ pasteurize.hashPassword('password1', (err, hash) => {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc