mirror of
https://github.com/emn178/js-md4.git
synced 2026-08-12 20:32:14 +08:00
Fixed ArrayBuffer dosen't work in Webpack.
This commit is contained in:
+127
-9
@@ -91,7 +91,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="md4.js.html">md4.js</a>, <a href="md4.js.html#line113">line 113</a>
|
||||
<a href="md4.js.html">md4.js</a>, <a href="md4.js.html#line114">line 114</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -198,7 +198,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="md4.js.html">md4.js</a>, <a href="md4.js.html#line479">line 479</a>
|
||||
<a href="md4.js.html">md4.js</a>, <a href="md4.js.html#line480">line 480</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -263,7 +263,7 @@
|
||||
|
||||
|
||||
|
||||
<h4 class="name" id="buffer"><span class="type-signature"></span>buffer<span class="signature">()</span><span class="type-signature"> → {ArrayBuffer}</span></h4>
|
||||
<h4 class="name" id="arrayBuffer"><span class="type-signature"></span>arrayBuffer<span class="signature">()</span><span class="type-signature"> → {ArrayBuffer}</span></h4>
|
||||
|
||||
|
||||
|
||||
@@ -314,7 +314,125 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="md4.js.html">md4.js</a>, <a href="md4.js.html#line491">line 491</a>
|
||||
<a href="md4.js.html">md4.js</a>, <a href="md4.js.html#line492">line 492</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-see">See:</dt>
|
||||
<dd class="tag-see">
|
||||
<ul>
|
||||
<li>md4.arrayBuffer</li>
|
||||
</ul>
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h5>Returns:</h5>
|
||||
|
||||
|
||||
<div class="param-desc">
|
||||
ArrayBuffer
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<dl>
|
||||
<dt>
|
||||
Type
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<span class="param-type">ArrayBuffer</span>
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
<h5>Example</h5>
|
||||
|
||||
<pre class="prettyprint"><code>hash.arrayBuffer();</code></pre>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h4 class="name" id="buffer"><span class="type-signature"></span>buffer<span class="signature">()</span><span class="type-signature"> → {ArrayBuffer}</span></h4>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="description">
|
||||
Output hash as ArrayBuffer
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dl class="details">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="important tag-deprecated">Deprecated:</dt><dd><ul class="dummy"><li>This maybe confuse with Buffer in node.js. Please use arrayBuffer instead.</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="md4.js.html">md4.js</a>, <a href="md4.js.html#line514">line 514</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -430,7 +548,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="md4.js.html">md4.js</a>, <a href="md4.js.html#line457">line 457</a>
|
||||
<a href="md4.js.html">md4.js</a>, <a href="md4.js.html#line458">line 458</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -546,7 +664,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="md4.js.html">md4.js</a>, <a href="md4.js.html#line412">line 412</a>
|
||||
<a href="md4.js.html">md4.js</a>, <a href="md4.js.html#line413">line 413</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -662,7 +780,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="md4.js.html">md4.js</a>, <a href="md4.js.html#line445">line 445</a>
|
||||
<a href="md4.js.html">md4.js</a>, <a href="md4.js.html#line446">line 446</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -836,7 +954,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="md4.js.html">md4.js</a>, <a href="md4.js.html#line141">line 141</a>
|
||||
<a href="md4.js.html">md4.js</a>, <a href="md4.js.html#line142">line 142</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -913,7 +1031,7 @@
|
||||
<br class="clear">
|
||||
|
||||
<footer>
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.0</a> on Mon Dec 28 2015 11:56:02 GMT+0800 (CST)
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a> on Mon Jan 23 2017 15:12:38 GMT+0800 (CST)
|
||||
</footer>
|
||||
|
||||
<script> prettyPrint(); </script>
|
||||
|
||||
+2
-2
@@ -210,7 +210,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="md4.js.html">md4.js</a>, <a href="md4.js.html#line518">line 518</a>
|
||||
<a href="md4.js.html">md4.js</a>, <a href="md4.js.html#line532">line 532</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -285,7 +285,7 @@
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<nav>
|
||||
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Md4_.html">Md4</a></li></ul><h3>Namespaces</h3><ul><li><a href="md4.html">md4</a></li></ul><h3>Global</h3><ul><li><a href="global.html#md4%2508">md4</a></li></ul>
|
||||
|
||||
+7
-6
@@ -49,13 +49,14 @@
|
||||
<h2>Download</h2><p><a href="https://raw.github.com/emn178/js-md4/master/build/md4.min.js">Compress</a><br><a href="https://raw.github.com/emn178/js-md4/master/src/md4.js">Uncompress</a></p>
|
||||
<h2>Installation</h2><p>You can also install js-md4 by using Bower.</p>
|
||||
<pre class="prettyprint source"><code>bower install js-md4</code></pre><p>For node.js, you can use this command to install:</p>
|
||||
<pre class="prettyprint source"><code>npm install js-md4</code></pre><h2>Usage</h2><p>You could use like this:</p>
|
||||
<pre class="prettyprint source"><code>npm install js-md4</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>
|
||||
<pre class="prettyprint source lang-JavaScript"><code>md4('Message to hash');
|
||||
var hash = md4.create();
|
||||
hash.update('Message to hash');
|
||||
hash.hex();</code></pre><p>If you use node.js, you should require the module first:</p>
|
||||
<pre class="prettyprint source lang-JavaScript"><code>md4 = require('js-md4');</code></pre><p>It supports AMD:</p>
|
||||
<pre class="prettyprint source lang-JavaScript"><code>require(['your/path/md4.js'], function(md4) {
|
||||
<pre class="prettyprint source lang-JavaScript"><code>var md4 = require('js-md4');</code></pre><p>It supports AMD:</p>
|
||||
<pre class="prettyprint source lang-JavaScript"><code>require(['your/path/md4.js'], function (md4) {
|
||||
// ...
|
||||
});</code></pre><p><a href="https://emn178.github.com/js-md4/doc/">See document</a></p>
|
||||
<h2>Example</h2><pre class="prettyprint source lang-JavaScript"><code>md4(''); // 31d6cfe0d16ae931b73c59d7e0c089c0
|
||||
@@ -74,8 +75,8 @@ md4(''); // 31d6cfe0d16ae931b73c59d7e0c089c0
|
||||
md4.hex(''); // 31d6cfe0d16ae931b73c59d7e0c089c0
|
||||
md4.array(''); // [49, 214, 207, 224, 209, 106, 233, 49, 183, 60, 89, 215, 224, 192, 137, 192]
|
||||
md4.digest(''); // [49, 214, 207, 224, 209, 106, 233, 49, 183, 60, 89, 215, 224, 192, 137, 192]
|
||||
md4.buffer(''); // ArrayBuffer</code></pre><h2>License</h2><p>The project is released under the <a href="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-md4<br>Author: Yi-Cyuan Chen</p></article>
|
||||
md4.arrayBuffer(''); // ArrayBuffer</code></pre><h2>License</h2><p>The project is released under the <a href="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-md4<br>Author: Chen, Yi-Cyuan (emn178@gmail.com)</p></article>
|
||||
</section>
|
||||
|
||||
|
||||
@@ -92,7 +93,7 @@ md4.buffer(''); // ArrayBuffer</code></pre><h2>License</h2><p>The project is rel
|
||||
<br class="clear">
|
||||
|
||||
<footer>
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.0</a> on Mon Dec 28 2015 11:56:02 GMT+0800 (CST)
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a> on Mon Jan 23 2017 15:12:38 GMT+0800 (CST)
|
||||
</footer>
|
||||
|
||||
<script> prettyPrint(); </script>
|
||||
|
||||
+9
-9
@@ -47,7 +47,7 @@
|
||||
|
||||
|
||||
<dt class="tag-version">Version:</dt>
|
||||
<dd class="tag-version"><ul class="dummy"><li>0.3.0</li></ul></dd>
|
||||
<dd class="tag-version"><ul class="dummy"><li>0.3.1</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@
|
||||
|
||||
|
||||
<dt class="tag-copyright">Copyright:</dt>
|
||||
<dd class="tag-copyright"><ul class="dummy"><li>Yi-Cyuan Chen 2015</li></ul></dd>
|
||||
<dd class="tag-copyright"><ul class="dummy"><li>Yi-Cyuan Chen 2015-2027</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
@@ -233,7 +233,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="md4.js.html">md4.js</a>, <a href="md4.js.html#line53">line 53</a>
|
||||
<a href="md4.js.html">md4.js</a>, <a href="md4.js.html#line54">line 54</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -400,7 +400,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="md4.js.html">md4.js</a>, <a href="md4.js.html#line62">line 62</a>
|
||||
<a href="md4.js.html">md4.js</a>, <a href="md4.js.html#line63">line 63</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -509,7 +509,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="md4.js.html">md4.js</a>, <a href="md4.js.html#line77">line 77</a>
|
||||
<a href="md4.js.html">md4.js</a>, <a href="md4.js.html#line78">line 78</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -676,7 +676,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="md4.js.html">md4.js</a>, <a href="md4.js.html#line44">line 44</a>
|
||||
<a href="md4.js.html">md4.js</a>, <a href="md4.js.html#line45">line 45</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -843,7 +843,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="md4.js.html">md4.js</a>, <a href="md4.js.html#line33">line 33</a>
|
||||
<a href="md4.js.html">md4.js</a>, <a href="md4.js.html#line34">line 34</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1010,7 +1010,7 @@
|
||||
|
||||
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="md4.js.html">md4.js</a>, <a href="md4.js.html#line86">line 86</a>
|
||||
</li></ul></dd>
|
||||
@@ -1085,7 +1085,7 @@
|
||||
|
||||
<nav>
|
||||
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Md4_.html">Md4</a></li></ul><h3>Namespaces</h3><ul><li><a href="md4.html">md4</a></li></ul><h3>Global</h3><ul><li><a href="global.html#md4%2508">md4</a></li></ul>
|
||||
</nav>
|
||||
</nav>
|
||||
|
||||
<br class="clear">
|
||||
|
||||
|
||||
+50
-36
@@ -30,22 +30,23 @@
|
||||
* [js-md4]{@link https://github.com/emn178/js-md4}
|
||||
*
|
||||
* @namespace md4
|
||||
* @version 0.3.0
|
||||
* @version 0.3.1
|
||||
* @author Yi-Cyuan Chen [emn178@gmail.com]
|
||||
* @copyright Yi-Cyuan Chen 2015
|
||||
* @copyright Yi-Cyuan Chen 2015-2027
|
||||
* @license MIT
|
||||
*/
|
||||
(function (root) {
|
||||
/*jslint bitwise: true */
|
||||
(function () {
|
||||
'use strict';
|
||||
|
||||
var NODE_JS = typeof process == 'object' && process.versions && process.versions.node;
|
||||
var root = typeof window === 'object' ? window : {};
|
||||
var NODE_JS = !root.JS_MD4_NO_NODE_JS && typeof process === 'object' && process.versions && process.versions.node;
|
||||
if (NODE_JS) {
|
||||
root = global;
|
||||
}
|
||||
var COMMON_JS = !root.JS_MD4_TEST && typeof module == 'object' && module.exports;
|
||||
var AMD = typeof define == 'function' && define.amd;
|
||||
|
||||
var ARRAY_BUFFER = !root.JS_MD4_TEST && typeof ArrayBuffer != 'undefined';
|
||||
var COMMON_JS = !root.JS_MD4_NO_COMMON_JS && typeof module === 'object' && module.exports;
|
||||
var AMD = typeof define === 'function' && define.amd;
|
||||
var ARRAY_BUFFER = !root.JS_MD4_NO_ARRAY_BUFFER && typeof ArrayBuffer !== 'undefined';
|
||||
var HEX_CHARS = '0123456789abcdef'.split('');
|
||||
var EXTRA = [128, 32768, 8388608, -2147483648];
|
||||
var SHIFT = [0, 8, 16, 24];
|
||||
@@ -130,7 +131,7 @@
|
||||
method.update = function (message) {
|
||||
return method.create().update(message);
|
||||
};
|
||||
for (var i = 0;i < OUTPUT_TYPES.length;++i) {
|
||||
for (var i = 0; i < OUTPUT_TYPES.length; ++i) {
|
||||
var type = OUTPUT_TYPES[i];
|
||||
method[type] = createOutputMethod(type);
|
||||
}
|
||||
@@ -179,8 +180,8 @@
|
||||
if (this.finalized) {
|
||||
return;
|
||||
}
|
||||
var notString = typeof(message) != 'string';
|
||||
if(notString && message.constructor == root.ArrayBuffer) {
|
||||
var notString = typeof message !== 'string';
|
||||
if(notString && ARRAY_BUFFER && message instanceof ArrayBuffer) {
|
||||
message = new Uint8Array(message);
|
||||
}
|
||||
var code, index = 0, i, length = message.length || 0, blocks = this.blocks;
|
||||
@@ -198,17 +199,17 @@
|
||||
|
||||
if (notString) {
|
||||
if (ARRAY_BUFFER) {
|
||||
for (i = this.start;index < length && i < 64; ++index) {
|
||||
for (i = this.start; index < length && i < 64; ++index) {
|
||||
buffer8[i++] = message[index];
|
||||
}
|
||||
} else {
|
||||
for (i = this.start;index < length && i < 64; ++index) {
|
||||
for (i = this.start; index < length && i < 64; ++index) {
|
||||
blocks[i >> 2] |= message[index] << SHIFT[i++ & 3];
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (ARRAY_BUFFER) {
|
||||
for (i = this.start;index < length && i < 64; ++index) {
|
||||
for (i = this.start; index < length && i < 64; ++index) {
|
||||
code = message.charCodeAt(index);
|
||||
if (code < 0x80) {
|
||||
buffer8[i++] = code;
|
||||
@@ -228,7 +229,7 @@
|
||||
}
|
||||
}
|
||||
} else {
|
||||
for (i = this.start;index < length && i < 64; ++index) {
|
||||
for (i = this.start; index < length && i < 64; ++index) {
|
||||
code = message.charCodeAt(index);
|
||||
if (code < 0x80) {
|
||||
blocks[i >> 2] |= code << SHIFT[i++ & 3];
|
||||
@@ -453,21 +454,21 @@
|
||||
var h0 = this.h0, h1 = this.h1, h2 = this.h2, h3 = this.h3;
|
||||
|
||||
return HEX_CHARS[(h0 >> 4) & 0x0F] + HEX_CHARS[h0 & 0x0F] +
|
||||
HEX_CHARS[(h0 >> 12) & 0x0F] + HEX_CHARS[(h0 >> 8) & 0x0F] +
|
||||
HEX_CHARS[(h0 >> 20) & 0x0F] + HEX_CHARS[(h0 >> 16) & 0x0F] +
|
||||
HEX_CHARS[(h0 >> 28) & 0x0F] + HEX_CHARS[(h0 >> 24) & 0x0F] +
|
||||
HEX_CHARS[(h1 >> 4) & 0x0F] + HEX_CHARS[h1 & 0x0F] +
|
||||
HEX_CHARS[(h1 >> 12) & 0x0F] + HEX_CHARS[(h1 >> 8) & 0x0F] +
|
||||
HEX_CHARS[(h1 >> 20) & 0x0F] + HEX_CHARS[(h1 >> 16) & 0x0F] +
|
||||
HEX_CHARS[(h1 >> 28) & 0x0F] + HEX_CHARS[(h1 >> 24) & 0x0F] +
|
||||
HEX_CHARS[(h2 >> 4) & 0x0F] + HEX_CHARS[h2 & 0x0F] +
|
||||
HEX_CHARS[(h2 >> 12) & 0x0F] + HEX_CHARS[(h2 >> 8) & 0x0F] +
|
||||
HEX_CHARS[(h2 >> 20) & 0x0F] + HEX_CHARS[(h2 >> 16) & 0x0F] +
|
||||
HEX_CHARS[(h2 >> 28) & 0x0F] + HEX_CHARS[(h2 >> 24) & 0x0F] +
|
||||
HEX_CHARS[(h3 >> 4) & 0x0F] + HEX_CHARS[h3 & 0x0F] +
|
||||
HEX_CHARS[(h3 >> 12) & 0x0F] + HEX_CHARS[(h3 >> 8) & 0x0F] +
|
||||
HEX_CHARS[(h3 >> 20) & 0x0F] + HEX_CHARS[(h3 >> 16) & 0x0F] +
|
||||
HEX_CHARS[(h3 >> 28) & 0x0F] + HEX_CHARS[(h3 >> 24) & 0x0F];
|
||||
HEX_CHARS[(h0 >> 12) & 0x0F] + HEX_CHARS[(h0 >> 8) & 0x0F] +
|
||||
HEX_CHARS[(h0 >> 20) & 0x0F] + HEX_CHARS[(h0 >> 16) & 0x0F] +
|
||||
HEX_CHARS[(h0 >> 28) & 0x0F] + HEX_CHARS[(h0 >> 24) & 0x0F] +
|
||||
HEX_CHARS[(h1 >> 4) & 0x0F] + HEX_CHARS[h1 & 0x0F] +
|
||||
HEX_CHARS[(h1 >> 12) & 0x0F] + HEX_CHARS[(h1 >> 8) & 0x0F] +
|
||||
HEX_CHARS[(h1 >> 20) & 0x0F] + HEX_CHARS[(h1 >> 16) & 0x0F] +
|
||||
HEX_CHARS[(h1 >> 28) & 0x0F] + HEX_CHARS[(h1 >> 24) & 0x0F] +
|
||||
HEX_CHARS[(h2 >> 4) & 0x0F] + HEX_CHARS[h2 & 0x0F] +
|
||||
HEX_CHARS[(h2 >> 12) & 0x0F] + HEX_CHARS[(h2 >> 8) & 0x0F] +
|
||||
HEX_CHARS[(h2 >> 20) & 0x0F] + HEX_CHARS[(h2 >> 16) & 0x0F] +
|
||||
HEX_CHARS[(h2 >> 28) & 0x0F] + HEX_CHARS[(h2 >> 24) & 0x0F] +
|
||||
HEX_CHARS[(h3 >> 4) & 0x0F] + HEX_CHARS[h3 & 0x0F] +
|
||||
HEX_CHARS[(h3 >> 12) & 0x0F] + HEX_CHARS[(h3 >> 8) & 0x0F] +
|
||||
HEX_CHARS[(h3 >> 20) & 0x0F] + HEX_CHARS[(h3 >> 16) & 0x0F] +
|
||||
HEX_CHARS[(h3 >> 28) & 0x0F] + HEX_CHARS[(h3 >> 24) & 0x0F];
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -517,16 +518,16 @@
|
||||
Md4.prototype.array = Md4.prototype.digest;
|
||||
|
||||
/**
|
||||
* @method buffer
|
||||
* @method arrayBuffer
|
||||
* @memberof Md4
|
||||
* @instance
|
||||
* @description Output hash as ArrayBuffer
|
||||
* @returns {ArrayBuffer} ArrayBuffer
|
||||
* @see {@link md4.buffer}
|
||||
* @see {@link md4.arrayBuffer}
|
||||
* @example
|
||||
* hash.buffer();
|
||||
* hash.arrayBuffer();
|
||||
*/
|
||||
Md4.prototype.buffer = function() {
|
||||
Md4.prototype.arrayBuffer = function() {
|
||||
this.finalize();
|
||||
|
||||
var buffer = new ArrayBuffer(16);
|
||||
@@ -538,6 +539,19 @@
|
||||
return buffer;
|
||||
};
|
||||
|
||||
/**
|
||||
* @method buffer
|
||||
* @deprecated This maybe confuse with Buffer in node.js. Please use arrayBuffer instead.
|
||||
* @memberof Md4
|
||||
* @instance
|
||||
* @description Output hash as ArrayBuffer
|
||||
* @returns {ArrayBuffer} ArrayBuffer
|
||||
* @see {@link md4.buffer}
|
||||
* @example
|
||||
* hash.buffer();
|
||||
*/
|
||||
Md4.prototype.buffer = Md4.prototype.arrayBuffer;
|
||||
|
||||
var exports = createMethod();
|
||||
|
||||
if (COMMON_JS) {
|
||||
@@ -567,7 +581,7 @@
|
||||
});
|
||||
}
|
||||
}
|
||||
}(this));
|
||||
})();
|
||||
</code></pre>
|
||||
</article>
|
||||
</section>
|
||||
@@ -584,7 +598,7 @@
|
||||
<br class="clear">
|
||||
|
||||
<footer>
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.0</a> on Mon Dec 28 2015 11:56:02 GMT+0800 (CST)
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a> on Mon Jan 23 2017 15:12:38 GMT+0800 (CST)
|
||||
</footer>
|
||||
|
||||
<script> prettyPrint(); </script>
|
||||
|
||||
@@ -153,7 +153,7 @@ h1
|
||||
margin: 12px 24px 20px;
|
||||
}
|
||||
|
||||
h2, h3
|
||||
h2, h3.subsection-title
|
||||
{
|
||||
font-size: 30px;
|
||||
font-weight: 700;
|
||||
@@ -161,6 +161,13 @@ h2, h3
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
h3
|
||||
{
|
||||
font-size: 24px;
|
||||
letter-spacing: -0.5px;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
h4
|
||||
{
|
||||
font-size: 18px;
|
||||
@@ -185,6 +192,32 @@ h6
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
table
|
||||
{
|
||||
border-spacing: 0;
|
||||
border: 0;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
td, th
|
||||
{
|
||||
border: 1px solid #ddd;
|
||||
margin: 0px;
|
||||
text-align: left;
|
||||
vertical-align: top;
|
||||
padding: 4px 6px;
|
||||
display: table-cell;
|
||||
}
|
||||
|
||||
thead tr
|
||||
{
|
||||
background-color: #ddd;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
th { border-right: 1px solid #aaa; }
|
||||
tr > th:last-child { border-right: 1px solid #ddd; }
|
||||
|
||||
.ancestors { color: #999; }
|
||||
.ancestors a
|
||||
{
|
||||
@@ -296,44 +329,12 @@ h6
|
||||
user-select: text;
|
||||
}
|
||||
|
||||
.params, .props
|
||||
{
|
||||
border-spacing: 0;
|
||||
border: 0;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
.params .name, .props .name, .name code {
|
||||
color: #4D4E53;
|
||||
font-family: Consolas, Monaco, 'Andale Mono', monospace;
|
||||
font-size: 100%;
|
||||
}
|
||||
|
||||
.params td, .params th, .props td, .props th
|
||||
{
|
||||
border: 1px solid #ddd;
|
||||
margin: 0px;
|
||||
text-align: left;
|
||||
vertical-align: top;
|
||||
padding: 4px 6px;
|
||||
display: table-cell;
|
||||
}
|
||||
|
||||
.params thead tr, .props thead tr
|
||||
{
|
||||
background-color: #ddd;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.params .params thead tr, .props .props thead tr
|
||||
{
|
||||
background-color: #fff;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.params th, .props th { border-right: 1px solid #aaa; }
|
||||
.params thead .last, .props thead .last { border-right: 1px solid #ddd; }
|
||||
|
||||
.params td.description > p:first-child,
|
||||
.props td.description > p:first-child
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user