1.0.0 • Published 4 years ago

hashjs-es v1.0.0

Weekly downloads
25
License
MIT
Repository
github
Last release
4 years ago

HashJs-ES

This is a ported library version built to support es2015 module standard.

Can find original library here.

Usages

Install library using the next command:

npm i hashjs-es --save

Usage

The library supports the next hash algorithms:

Sha1, Sha224, Sha256, Sha384, Sha512, Ripemd160

Common usage

import { Hash } from 'hashjs-es';

Hash.sha1().update('abc').digest('hex');

Hash.sha224().update('abc').digest('hex');

Hash.sha224().update('abc').digest('hex');

Hash.sha384().update('abc').digest('hex');

Hash.sha512().update('abc').digest('hex');

Hash.ripemd160().update('abc').digest('hex');

Selective hash usage

import { sha1, sha224, sha256, sha384, sha512, ripemd160 } from 'hashjs-es';

sha1().update('abc').digest('hex');

sha224().update('abc').digest('hex');

sha224().update('abc').digest('hex');

sha384().update('abc').digest('hex');

sha512().update('abc').digest('hex');

ripemd160().update('abc').digest('hex');