1.0.0 • Published 9 years ago

co-credential v1.0.0

Weekly downloads
2
License
MIT
Repository
github
Last release
9 years ago

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