co-credential
v1.0.0
Published
Co wrapper for credential module
Downloads
5
Maintainers
Readme
co-credential
co wrapper for the credential module.
Install
$ 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