hash36
Crypto hashes in base36
Install
npm i hash36 --save
Use
var hash = require('hash36')
hash.md5('hello')
hash.sha1('hello')
hash.sha256('hello')
hash.sha512('hello')
hash(input, [options])
Returns a hash.
input
Type: buffer
, string
, array
of string|buffer
Buffer you want to hash.
While strings are supported you should prefer buffers as they're faster to hash. Though if you already have a string you should not convert it to a buffer.
Pass an array instead of concatenating strings and/or buffers. The output is the same, but arrays do not incur the overhead of concatenation.
options
encoding
Type: string
Default: hex
Values: hex
, base64
, buffer
, binary
Encoding of the returned hash.
algorithm
Type: string
Default: sha512
Values: md5
, sha1
, sha256
, sha512
License MIT