1.1.0 • Published 5 years ago

iana-hashes v1.1.0

Weekly downloads
3,176
License
MIT
Repository
github
Last release
5 years ago

IANA-Hashes

Use the IANA registered hash names with node crypto's hash functions

Build Status Dependency Status devDependency Status

Browser Support

What is this?

The iana-hashes module is a very thin wrapper for the node crypto module's hash functions, allowing you to use the hash names registered with IANA, which are the names typically used in Internet standards.

Installing

$ npm install iana-hashes

Building bundled/minified version (for AMD, etc)

$ make

The bundled and minified files will be in the generated build directory.

IANA Registry

View the "Hash Function Textual Names" registry at IANA

cryptoIANA
md2md2
md5md5
sha1sha-1
sha224sha-224
sha256sha-256
sha384sha-384
sha512sha-512

Usage

var hashes = require('iana-hashes');

hashes.createHash('sha-1').update('test-sha1').digest('hex');
hashes.createHmac('sha-1', 'key').update('test-sha1-hmac').digest('hex');

License

MIT

Created By

If you like this, follow @lancestout on twitter.