1.0.0 • Published 6 years ago

@nhz.io/md5 v1.0.0

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

Calculate MD5 Digest of a sting (hex)

Travis Build NPM Version

Install

npm i -S @nhz.io/md5

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