apasswd
Password manager
Last updated 7 months ago by okunishinishi .
MIT · Repository · Bugs · Original npm · Tarball
$ cnpm install apasswd 
SYNC missed versions from official npm registry.

apasswd

Build Status Code Climate Code Coverage npm Version JS Standard

Password manager

Installation

$ npm install apasswd --save

Usage

Generate a New Salt

'use strict'

const apasswd = require('apasswd')
const co = require('co')

co(function * () {
  let salt = yield apasswd.newSalt(24)

  console.log(salt) // -> b8c0faa8df6e43fe9fa2f4a1
}).catch((err) => console.error(err))

Digest Text

'use strict'

const apasswd = require('apasswd')
const co = require('co')

let password = 'm*y*p*a*s*s*w*o*r*d'
let salt = '1234asdf'

co(function * () {
  let hash = yield apasswd.digest(password, salt)
  /* ... */
}).catch((err) => console.error(err))

Advanced Usage

'use strict'

const co = require('co')
// Define a new apasswd context.
const apasswd = require('apasswd').create({
  algorithm: 'pdkdf2', // algorithm for digest.
  iterations: 120, // Iteration count
  length: 84, // Digest key length
  format: 'hex'
})

co(function () {
  let hash = yield apasswd.digest('my_password', 'my_salt')
}).catch((err) => console.error(err))

License

This software is released under the MIT License.

Links

Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (3)
Dev Dependencies (11)
Dependents (2)

Copyright 2014 - 2016 © taobao.org |