This package has been deprecated

Author message:

unsupported / joke / demo

p-hash

1.0.0 • Public • Published

p-hash

Simple functions that return the hash of a buffer as a promise.

const phash = require('p-hash');
const data = new Buffer('this is my data');
phash(data).then(hash=>console.log('sha256: ' + hash));
phash.md5(data).then(hash=>console.log('md5: ' + hash));
phash.sha1(data).then(hash=>console.log('sha1: ' + hash));
phash.sha256(data).then(hash=>console.log('sha256: ' + hash));
phash.sha384(data).then(hash=>console.log('sha384: ' + hash));
phash.sha512(data).then(hash=>console.log('sha512: ' + hash));
phash.hash('newfangled', data).then(hash=>console.log('hash(according to available newfangled algorithm): ' + hash));

The functions are all defined as shaXXX(...buffers)=>{...} so that they can take one or more buffers as arguments.

Dependencies (0)

    Dev Dependencies (1)

    Package Sidebar

    Install

    npm i p-hash

    Weekly Downloads

    2

    Version

    1.0.0

    License

    MIT

    Last publish

    Collaborators

    • pipobscure