@nhz.io/md5
v1.0.0
Published
Calculate MD5 Digest of a sting
Readme
Calculate MD5 Digest of a sting (hex)
Install
npm i -S @nhz.io/md5Usage
const md5 = require('@nhz-io/md5')
const digest = md5('foobar')
...Imports
crypto = require 'crypto'
md5 = (string) ->
hash = crypto.createHash 'md5'
hash.update string
hash.digest 'hex'Exports
module.exports = md5Tests
assert = require 'assert'
assert.ok (md5 'foobar') is '3858f62230ac3c915f300c664312c63f'
console.log 'pass'