0.1.2 • Published 8 years ago

gracenode-encrypt v0.1.2

Weekly downloads
1
License
MIT
Repository
github
Last release
8 years ago

Encrypt Module

Encrypt module for gracenode framework.

This is designed to function within gracenode framework.

How to include it in my project

To add this package as your gracenode module, add the following to your package.json:

"dependencies": {
        "gracenode": "",
        "gracenode-encrypt": ""
}

To use this module in your application, add the following to your gracenode bootstrap code:

var gracenode = require('gracenode');
// this tells gracenode to load the module
gracenode.use('gracenode-encrypt');

To access the module:

// the prefix gracenode- will be removed automatically
gracenode.encrypt

Access

Configurations N/A

###API: createHash

Creates a hash with salt from sourceStr

This function uses bcrypt module and it is based on blowfish encryption.

Bigger the cost the slower this function will become.

###API: validateHash

Validates a hash and str

###API: uuid

Creates a uuid. This module uses node-uuid module.

Possible values for version are 1 or 4

Version 1 is timestamp-base and version 4 is random-base