crypto-hashing

Easy interfaces for cryptographic hash functions

Crypto Hashing

Provides a common interface for cryptographic hash functions commonly used in cryptocoin protocols.

If only interested in sub-set of hashes, reference just that function of the exported module:

var sha256 = require('crypto-hashing').sha256;
 
console.log(sha256('hello'));
console.log(sha256.x2('hello'));

Or reference the whole module for all the functions:

var hash = require('crypto-hashing');
 
console.log(hash.sha256('hello'));
console.log(hash.ripemd160('hello'));

Unit tests are written in Mocha. To run the test suite, install mocha either by installing it globally or installing the development dependencies with NPM. Then, from within the project's folder run mocha.