Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

js-md2

emn17822.4kMIT0.2.2

A simple MD2 hash function for JavaScript supports UTF-8 encoding.

md2, hash, encryption, cryptography, HMAC

readme

js-md2

Build Status Build Status
NPM
A simple MD2 hash function for JavaScript supports UTF-8 encoding.

Demo

MD2 Online

Download

Compress
Uncompress

Installation

You can also install js-md2 by using Bower.

bower install js-md2

For node.js, you can use this command to install:

npm install js-md2

Usage

You could use like this:

md2('Message to hash');

If you use node.js, you should require the module first:

var md2 = require('js-md2');

If you use require.js, you should require the module first:

require(['md2.js'], function (md2) {
  // ...
});

Example

md2(''); // 8350e5a3e24c153df2275c9f80692773
md2('The quick brown fox jumps over the lazy dog'); // 03d85a0d629d2c442e987525319fc471
md2('The quick brown fox jumps over the lazy dog.'); // 71eaa7e440b611e41a6f0d97384b342a

// It also supports UTF-8 encoding
md2('中文'); // 7af93c270b0ec392ca2f0d90a927cf8a

License

The project is released under the MIT license.

Contact

The project's website is located at https://github.com/emn178/js-md2
Author: Chen, Yi-Cyuan (emn178@gmail.com)

changelog

Change Log

v0.2.2 / 2017-02-08

Fixed

  • root is undefined in some special environment.

v0.2.1 / 2015-04-03

Added

  • support AMD.

v0.2.0 / 2015-02-28

Added

  • test cases.

Removed

  • ascii parameter.

Improved

  • performance.

v0.1.2 / 2015-01-07

Added

  • bower package.
  • travis.
  • coveralls.

Fixed

  • JSHint warnings.

v0.1.1 / 2014-07-27

Fixed

  • accents bug

v0.1.0 / 2014-01-05

Added

  • initial release.