@nhz.io/md5
1.0.0 • Public • Published
Calculate MD5 Digest of a sting (hex)
Install
Usage
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 = md5
Tests
assert = require 'assert'
assert.ok (md5 'foobar') is '3858f62230ac3c915f300c664312c63f'
console.log 'pass'
Version 1.0.0
License MIT
Package Sidebar
Install
Weekly Downloads