co-credential

1.0.0 • Public • Published

co-credential

co wrapper for the credential module.

Install

Install the package with npm:

$ npm install co-credential

Usage

Example

var credential = require('credential');
var hash = credential.hash;
var verify = credential.verify;
 
var h = yield* hash('my very secret password');
 
//...
 
var valid = yield* verify(h, 'my very secret password');
 
if (valid) {
  console.log('ok!');
}

API

.hash(pass)

Creates a unique hash, based on pass.

.verify(hash, input)

Verifies input against hash.

.configure(opts)

See the original

License

MIT

Package Sidebar

Install

npm i co-credential

Weekly Downloads

0

Version

1.0.0

License

MIT

Last publish

Collaborators

  • lennon