JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 58
  • Score
    100M100P100Q68014F
  • License MIT

A wrapper around the inbuilt pbkdf2 crypto function for password hashing

Package Exports

  • pbkdf2-wrapper/hashText
  • pbkdf2-wrapper/verifyHash

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (pbkdf2-wrapper) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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.

Installation

npm install --save pbkdf2-wrapper

Example Usage

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

const config = {
  encoding: 'hex',
  digest: 'sha256',
  hashBytes: 32,
  saltBytes: 16,
  iterations: 372791
}

// config is optional, if not passed will use the above as defaults
const password = await hashText('test-password', config)
const equality = await verifyHash('test-password', password, config)

equality === true

License

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