js-md4
A simple MD4 hash function for JavaScript supports UTF-8 encoding.
Demo
MD4 Online
Download
Compress
Uncompress
Installation
You can also install js-md4 by using Bower.
bower install js-md4
For node.js, you can use this command to install:
npm install js-md4
Usage
You could use like this:
md4('Message to hash');
var hash = md4.create();
hash.update('Message to hash');
hash.hex();
If you use node.js, you should require the module first:
md4 = require('js-md4');
It supports AMD:
require(['your/path/md4.js'], function(md4) {
});
See document
Example
md4('');
md4('The quick brown fox jumps over the lazy dog');
md4('The quick brown fox jumps over the lazy dog.');
md4('中文');
md4([]);
md4(new Uint8Array([]));
md4('');
md4.hex('');
md4.array('');
md4.digest('');
md4.buffer('');
License
The project is released under the MIT license.
Contact
The project's website is located at https://github.com/emn178/js-md4
Author: Yi-Cyuan Chen