<dtclass="important tag-deprecated">Deprecated:</dt><dd><ulclass="dummy"><li>This maybe confuse with Buffer in node.js. Please use arrayBuffer instead.</li></ul></dd>
<preclass="prettyprint"><code>md5(''); // d41d8cd98f00b204e9800998ecf8427e
md5('The quick brown fox jumps over the lazy dog'); // 9e107d9d372bb6826bd81d3542a419d6
md5('The quick brown fox jumps over the lazy dog.'); // e4d909c290d0fb1ca068ffaddf22cbd0
// It also supports UTF-8 encoding
md5('中文'); // a7bac2239fcdcb3a067903d8077c4a07
// It also supports byte `Array`, `Uint8Array`, `ArrayBuffer`
md5([]); // d41d8cd98f00b204e9800998ecf8427e
md5(new Uint8Array([])); // d41d8cd98f00b204e9800998ecf8427e</code></pre>
md5('The quick brown fox jumps over the lazy dog'); // 9e107d9d372bb6826bd81d3542a419d6
md5('The quick brown fox jumps over the lazy dog.'); // e4d909c290d0fb1ca068ffaddf22cbd0
// It also supports UTF-8 encoding
md5('中文'); // a7bac2239fcdcb3a067903d8077c4a07
// It also supports byte `Array`, `Uint8Array`, `ArrayBuffer`
<h2>Installation</h2><p>You can also install js-md5 by using Bower.</p>
<h2>Installation</h2><p>You can also install js-md5 by using Bower.</p>
<preclass="prettyprint source"><code>bower install md5</code></pre><p>For node.js, you can use this command to install:</p>
<preclass="prettyprint source"><code>bower install md5</code></pre><p>For node.js, you can use this command to install:</p>
<preclass="prettyprint source"><code>npm install js-md5</code></pre><h2>Usage</h2><p>You could use like this:</p>
<preclass="prettyprint source"><code>npm install js-md5</code></pre><h2>Notice</h2><p><code>buffer</code> method is deprecated. This maybe confuse with Buffer in node.js. Please use <code>arrayBuffer</code> instead.</p>
<h2>Usage</h2><p>You could use like this:</p>
<preclass="prettyprint source lang-JavaScript"><code>md5('Message to hash');
<preclass="prettyprint source lang-JavaScript"><code>md5('Message to hash');
md5.buffer(''); // ArrayBuffer, deprecated, This maybe confuse with Buffer in node.js. Please use arrayBuffer instead.</code></pre><h2>Benchmark</h2><p><ahref="http://jsperf.com/md5-shootout/81">UTF8</a><br><ahref="http://jsperf.com/md5-shootout/82">ASCII</a></p>
<h2>License</h2><p>The project is released under the <ahref="http://www.opensource.org/licenses/MIT">MIT license</a>.</p>
<h2>License</h2><p>The project is released under the <ahref="http://www.opensource.org/licenses/MIT">MIT license</a>.</p>
<h2>Contact</h2><p>The project's website is located at https://github.com/emn178/js-md5<br>Author: Yi-Cyuan Chen (emn178@gmail.com)</p></article>
<h2>Contact</h2><p>The project's website is located at https://github.com/emn178/js-md5<br>Author: Chen, Yi-Cyuan (emn178@gmail.com)</p></article>
<preclass="prettyprint"><code>md5.array('The quick brown fox jumps over the lazy dog');</code></pre>
<preclass="prettyprint"><code>md5.arrayBuffer('The quick brown fox jumps over the lazy dog');</code></pre>
@ -623,6 +555,8 @@
<dtclass="important tag-deprecated">Deprecated:</dt><dd><ulclass="dummy"><li>This maybe confuse with Buffer in node.js. Please use arrayBuffer instead.</li></ul></dd>
<preclass="prettyprint"><code>md5.hex('The quick brown fox jumps over the lazy dog');
<preclass="prettyprint"><code>md5.hex('The quick brown fox jumps over the lazy dog');
// equal to
md5('The quick brown fox jumps over the lazy dog');</code></pre>
// equal to
md5('The quick brown fox jumps over the lazy dog');</code></pre>
@ -1247,7 +1179,7 @@ md5('The quick brown fox jumps over the lazy dog');</code></pre>
@ -1296,10 +1228,7 @@ md5('The quick brown fox jumps over the lazy dog');</code></pre>
<h5>Example</h5>
<h5>Example</h5>
<preclass="prettyprint"><code>var hash = md5.update('The quick brown fox jumps over the lazy dog');
<preclass="prettyprint"><code>var hash = md5.update('The quick brown fox jumps over the lazy dog');
// equal to
var hash = md5.create();
hash.update('The quick brown fox jumps over the lazy dog');</code></pre>
// equal to
var hash = md5.create();
hash.update('The quick brown fox jumps over the lazy dog');</code></pre>
@ -1325,7 +1254,7 @@ hash.update('The quick brown fox jumps over the lazy dog');</code></pre>
<brclass="clear">
<brclass="clear">
<footer>
<footer>
Documentation generated by <ahref="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.0</a> on Mon Dec 28 2015 15:48:48 GMT+0800 (CST)
Documentation generated by <ahref="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.0</a> on Thu Mar 31 2016 16:24:21 GMT+0800 (CST)
// expect(md5('The quick brown fox jumps over the lazy dog')).to.be('9e107d9d372bb6826bd81d3542a419d6');
// expect(md5('The quick brown fox jumps over the lazy dog.')).to.be('e4d909c290d0fb1ca068ffaddf22cbd0');
// });
// });
// describe('more than 64 bytes', function() {
// it('should be successful', function() {
// expect(md5('The MD5 message-digest algorithm is a widely used cryptographic hash function producing a 128-bit (16-byte) hash value, typically expressed in text format as a 32 digit hexadecimal number. MD5 has been utilized in a wide variety of cryptographic applications, and is also commonly used to verify data integrity.')).to.be('f63872ef7bc97a8a8eadba6f0881de53');