Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

pbkdf2-wrapper

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pbkdf2-wrapper

A wrapper around the inbuilt pbkdf2 crypto function for password hashing

  • 1.1.2
  • hash
  • salt
  • crypto
  • passphrase
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
30
increased by57.89%
Maintainers
1
Weekly downloads
 
Created
Source

pbkdf2-wrapper

Build Status David DM GitHub code size in bytes GitHub package.json version GitHub

A light wrapper around the native inbuilt pbkdf2 crypto functions used for password hashing, exposing promises and callbacks.

Installation

npm install --save pbkdf2-wrapper

Example Usage

const hashText = require('pbkdf2-wrapper/hashText')
const verifyHash = require('pbkdf2-wrapper/verifyHash')

// config is optional, if not passed will use the above as defaults
const config = {
  encoding: 'hex',
  digest: 'sha256',
  hashBytes: 32,
  saltBytes: 16,
  iterations: 372791
}

// Promises
const password = await hashText('test-password', config)
const equality = await verifyHash('test-password', password, config)

// Callbacks
hashText('test-password', config)(function (error, hash) {
  // do something
})
verifyHash('test-password', password, config)(function (err, equality) {
  // do something
})

License

This project is licensed under the terms of the MIT license.

FAQs

Package last updated on 08 Nov 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc