mirror of
https://github.com/emn178/js-md5.git
synced 2026-08-12 20:31:43 +08:00
Added support base64 string output.
This commit is contained in:
+218
-12
@@ -47,7 +47,7 @@
|
||||
|
||||
|
||||
<dt class="tag-version">Version:</dt>
|
||||
<dd class="tag-version"><ul class="dummy"><li>0.5.0</li></ul></dd>
|
||||
<dd class="tag-version"><ul class="dummy"><li>0.6.0</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
@@ -110,7 +110,9 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -124,7 +126,9 @@
|
||||
|
||||
|
||||
|
||||
|
||||
<h4 class="name" id=".array"><span class="type-signature">(static) </span>array<span class="signature">(message)</span><span class="type-signature"> → {Array}</span></h4>
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -233,7 +237,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="md5.js.html">md5.js</a>, <a href="md5.js.html#line67">line 67</a>
|
||||
<a href="md5.js.html">md5.js</a>, <a href="md5.js.html#line68">line 68</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -280,6 +284,8 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h5>Example</h5>
|
||||
|
||||
<pre class="prettyprint"><code>md5.array('The quick brown fox jumps over the lazy dog');</code></pre>
|
||||
@@ -291,7 +297,9 @@
|
||||
|
||||
|
||||
|
||||
|
||||
<h4 class="name" id=".arrayBuffer"><span class="type-signature">(static) </span>arrayBuffer<span class="signature">(message)</span><span class="type-signature"> → {ArrayBuffer}</span></h4>
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -400,7 +408,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="md5.js.html">md5.js</a>, <a href="md5.js.html#line76">line 76</a>
|
||||
<a href="md5.js.html">md5.js</a>, <a href="md5.js.html#line77">line 77</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -447,6 +455,8 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h5>Example</h5>
|
||||
|
||||
<pre class="prettyprint"><code>md5.arrayBuffer('The quick brown fox jumps over the lazy dog');</code></pre>
|
||||
@@ -458,7 +468,180 @@
|
||||
|
||||
|
||||
|
||||
|
||||
<h4 class="name" id=".base64"><span class="type-signature">(static) </span>base64<span class="signature">(message)</span><span class="type-signature"> → {String}</span></h4>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="description">
|
||||
Output hash as base64 string
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h5>Parameters:</h5>
|
||||
|
||||
|
||||
<table class="params">
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
<th>Name</th>
|
||||
|
||||
|
||||
<th>Type</th>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<th class="last">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="name"><code>message</code></td>
|
||||
|
||||
|
||||
<td class="type">
|
||||
|
||||
|
||||
<span class="param-type">String</span>
|
||||
|
|
||||
|
||||
<span class="param-type">Array</span>
|
||||
|
|
||||
|
||||
<span class="param-type">Uint8Array</span>
|
||||
|
|
||||
|
||||
<span class="param-type">ArrayBuffer</span>
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<td class="description last">message to hash</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dl class="details">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="md5.js.html">md5.js</a>, <a href="md5.js.html#line96">line 96</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h5>Returns:</h5>
|
||||
|
||||
|
||||
<div class="param-desc">
|
||||
base64 string
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<dl>
|
||||
<dt>
|
||||
Type
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<span class="param-type">String</span>
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h5>Example</h5>
|
||||
|
||||
<pre class="prettyprint"><code>md5.base64('The quick brown fox jumps over the lazy dog');</code></pre>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h4 class="name" id=".buffer"><span class="type-signature">(static) </span>buffer<span class="signature">(message)</span><span class="type-signature"> → {ArrayBuffer}</span></h4>
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -569,7 +752,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="md5.js.html">md5.js</a>, <a href="md5.js.html#line85">line 85</a>
|
||||
<a href="md5.js.html">md5.js</a>, <a href="md5.js.html#line86">line 86</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -616,6 +799,8 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h5>Example</h5>
|
||||
|
||||
<pre class="prettyprint"><code>md5.buffer('The quick brown fox jumps over the lazy dog');</code></pre>
|
||||
@@ -627,7 +812,9 @@
|
||||
|
||||
|
||||
|
||||
|
||||
<h4 class="name" id=".create"><span class="type-signature">(static) </span>create<span class="signature">()</span><span class="type-signature"> → {<a href="Md5_.html">Md5</a>}</span></h4>
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -678,7 +865,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="md5.js.html">md5.js</a>, <a href="md5.js.html#line101">line 101</a>
|
||||
<a href="md5.js.html">md5.js</a>, <a href="md5.js.html#line111">line 111</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -725,6 +912,8 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h5>Example</h5>
|
||||
|
||||
<pre class="prettyprint"><code>var hash = md5.create();</code></pre>
|
||||
@@ -736,7 +925,9 @@
|
||||
|
||||
|
||||
|
||||
|
||||
<h4 class="name" id=".digest"><span class="type-signature">(static) </span>digest<span class="signature">(message)</span><span class="type-signature"> → {Array}</span></h4>
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -845,7 +1036,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="md5.js.html">md5.js</a>, <a href="md5.js.html#line58">line 58</a>
|
||||
<a href="md5.js.html">md5.js</a>, <a href="md5.js.html#line59">line 59</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -892,6 +1083,8 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h5>Example</h5>
|
||||
|
||||
<pre class="prettyprint"><code>md5.digest('The quick brown fox jumps over the lazy dog');</code></pre>
|
||||
@@ -903,7 +1096,9 @@
|
||||
|
||||
|
||||
|
||||
|
||||
<h4 class="name" id=".hex"><span class="type-signature">(static) </span>hex<span class="signature">(message)</span><span class="type-signature"> → {String}</span></h4>
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1012,7 +1207,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="md5.js.html">md5.js</a>, <a href="md5.js.html#line47">line 47</a>
|
||||
<a href="md5.js.html">md5.js</a>, <a href="md5.js.html#line48">line 48</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1059,9 +1254,13 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h5>Example</h5>
|
||||
|
||||
<pre class="prettyprint"><code>md5.hex('The quick brown fox jumps over the lazy dog');
|
||||
<pre class="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>
|
||||
|
||||
|
||||
|
||||
@@ -1070,7 +1269,9 @@
|
||||
|
||||
|
||||
|
||||
|
||||
<h4 class="name" id=".update"><span class="type-signature">(static) </span>update<span class="signature">(message)</span><span class="type-signature"> → {<a href="Md5_.html">Md5</a>}</span></h4>
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1179,7 +1380,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<a href="md5.js.html">md5.js</a>, <a href="md5.js.html#line119">line 119</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1226,9 +1427,14 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h5>Example</h5>
|
||||
|
||||
<h5>Example</h5>
|
||||
<pre class="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>
|
||||
|
||||
|
||||
|
||||
@@ -1254,7 +1460,7 @@
|
||||
<br class="clear">
|
||||
|
||||
<footer>
|
||||
</nav>
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.3</a> on Fri Jul 28 2017 14:11:21 GMT+0800 (CST)
|
||||
</footer>
|
||||
|
||||
<script> prettyPrint(); </script>
|
||||
|
||||
Reference in New Issue
Block a user