-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path_stablelib_sha224.SHA224.html
More file actions
36 lines (36 loc) · 30.8 KB
/
_stablelib_sha224.SHA224.html
File metadata and controls
36 lines (36 loc) · 30.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<!DOCTYPE html><html class="default" lang="en"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>SHA224 | StableLib</title><meta name="description" content="Documentation for StableLib"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">StableLib</a></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb"><li><a href="../index.html">StableLib</a></li><li><a href="../modules/_stablelib_sha224.html">@stablelib/sha224</a></li><li><a href="_stablelib_sha224.SHA224.html">SHA224</a></li></ul><h1>Class SHA224</h1></div><section class="tsd-panel tsd-comment"><div class="tsd-comment tsd-typography"><p>SHA-2-224 cryptographic hash algorithm.</p>
<p>SHA-224 is the same algorithm as SHA-256, but with
different initialization vectors and digest length.</p>
</div><div class="tsd-comment tsd-typography"></div></section><section class="tsd-panel tsd-hierarchy"><h4>Hierarchy (<a href="../hierarchy.html#@stablelib/sha224.SHA224">view full</a>)</h4><ul class="tsd-hierarchy"><li><a href="_stablelib_sha256.SHA256.html" class="tsd-signature-type tsd-kind-class">SHA256</a><ul class="tsd-hierarchy"><li><span class="target">SHA224</span></li></ul></li></ul></section><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/StableLib/stablelib/blob/fc5ed95550b1deba7fa2f1418a174fa003546465/packages/sha224/sha224.ts#L19">sha224/sha224.ts:19</a></li></ul></aside><section class="tsd-panel-group tsd-index-group"><section class="tsd-panel tsd-index-panel"><details class="tsd-index-content tsd-accordion" open><summary class="tsd-accordion-summary tsd-index-summary"><h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex="0"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-chevronSmall"></use></svg> Index</h5></summary><div class="tsd-accordion-details"><section class="tsd-index-section"><h3 class="tsd-index-heading">Constructors</h3><div class="tsd-index-list"><a href="_stablelib_sha224.SHA224.html#constructor" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a>
</div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Properties</h3><div class="tsd-index-list"><a href="_stablelib_sha224.SHA224.html#_state" class="tsd-index-link tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>_state</span></a>
<a href="_stablelib_sha224.SHA224.html#blockSize" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>block<wbr/>Size</span></a>
<a href="_stablelib_sha224.SHA224.html#digestLength" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>digest<wbr/>Length</span></a>
</div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Methods</h3><div class="tsd-index-list"><a href="_stablelib_sha224.SHA224.html#_initState" class="tsd-index-link tsd-is-protected"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>_init<wbr/>State</span></a>
<a href="_stablelib_sha224.SHA224.html#clean" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>clean</span></a>
<a href="_stablelib_sha224.SHA224.html#cleanSavedState" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>clean<wbr/>Saved<wbr/>State</span></a>
<a href="_stablelib_sha224.SHA224.html#digest" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>digest</span></a>
<a href="_stablelib_sha224.SHA224.html#finish" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>finish</span></a>
<a href="_stablelib_sha224.SHA224.html#reset" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>reset</span></a>
<a href="_stablelib_sha224.SHA224.html#restoreState" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>restore<wbr/>State</span></a>
<a href="_stablelib_sha224.SHA224.html#saveState" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>save<wbr/>State</span></a>
<a href="_stablelib_sha224.SHA224.html#update" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>update</span></a>
</div></section></div></details></section></section><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Constructors"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Constructors</h2></summary><section><section class="tsd-panel tsd-member"><a id="constructor" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>constructor</span><a href="#constructor" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="constructor.new_SHA224" class="tsd-anchor"></a><span class="tsd-kind-constructor-signature">new SHA224</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="_stablelib_sha224.SHA224.html" class="tsd-signature-type tsd-kind-class">SHA224</a><a href="#constructor.new_SHA224" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><h4 class="tsd-returns-title">Returns <a href="_stablelib_sha224.SHA224.html" class="tsd-signature-type tsd-kind-class">SHA224</a></h4><aside class="tsd-sources"><p>Inherited from <a href="_stablelib_sha256.SHA256.html">SHA256</a>.<a href="_stablelib_sha256.SHA256.html#constructor">constructor</a></p><ul><li>Defined in sha256/lib/sha256.d.ts:21</li></ul></aside></li></ul></section></section></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Properties"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Properties</h2></summary><section><section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_state" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Protected</code><span>_state</span><a href="#_state" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">_state</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Int32Array</span></div><aside class="tsd-sources"><p>Inherited from <a href="_stablelib_sha256.SHA256.html">SHA256</a>.<a href="_stablelib_sha256.SHA256.html#_state">_state</a></p><ul><li>Defined in sha256/lib/sha256.d.ts:15</li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-inherited"><a id="blockSize" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Readonly</code><span>block<wbr/>Size</span><a href="#blockSize" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">block<wbr/>Size</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><div class="tsd-comment tsd-typography"><p>Block size</p>
</div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Inherited from <a href="_stablelib_sha256.SHA256.html">SHA256</a>.<a href="_stablelib_sha256.SHA256.html#blockSize">blockSize</a></p><ul><li>Defined in sha256/lib/sha256.d.ts:14</li></ul></aside></section><section class="tsd-panel tsd-member"><a id="digestLength" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Readonly</code><span>digest<wbr/>Length</span><a href="#digestLength" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">digest<wbr/>Length</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = DIGEST_LENGTH</span></div><div class="tsd-comment tsd-typography"><p>Length of hash output</p>
</div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Overrides <a href="_stablelib_sha256.SHA256.html">SHA256</a>.<a href="_stablelib_sha256.SHA256.html#digestLength">digestLength</a></p><ul><li>Defined in <a href="https://github.com/StableLib/stablelib/blob/fc5ed95550b1deba7fa2f1418a174fa003546465/packages/sha224/sha224.ts#L21">sha224/sha224.ts:21</a></li></ul></aside></section></section></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Methods"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Methods</h2></summary><section><section class="tsd-panel tsd-member tsd-is-protected"><a id="_initState" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Protected</code><span>_init<wbr/>State</span><a href="#_initState" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-protected"><li class="tsd-signature tsd-anchor-link"><a id="_initState._initState-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">_init<wbr/>State</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#_initState._initState-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources"><p>Overrides <a href="_stablelib_sha256.SHA256.html">SHA256</a>.<a href="_stablelib_sha256.SHA256.html#_initState">_initState</a></p><ul><li>Defined in <a href="https://github.com/StableLib/stablelib/blob/fc5ed95550b1deba7fa2f1418a174fa003546465/packages/sha224/sha224.ts#L23">sha224/sha224.ts:23</a></li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited"><a id="clean" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>clean</span><a href="#clean" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited"><li class="tsd-signature tsd-anchor-link"><a id="clean.clean-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">clean</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#clean.clean-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Cleans internal buffers and resets hash state.</p>
</div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Inherited from <a href="_stablelib_sha256.SHA256.html">SHA256</a>.<a href="_stablelib_sha256.SHA256.html#clean">clean</a></p><ul><li>Defined in sha256/lib/sha256.d.ts:31</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited"><a id="cleanSavedState" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>clean<wbr/>Saved<wbr/>State</span><a href="#cleanSavedState" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited"><li class="tsd-signature tsd-anchor-link"><a id="cleanSavedState.cleanSavedState-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">clean<wbr/>Saved<wbr/>State</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">savedState</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#cleanSavedState.cleanSavedState-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Cleans state returned by saveState().</p>
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">savedState</span>: <a href="../types/_stablelib_sha256.SavedState.html" class="tsd-signature-type tsd-kind-type-alias">SavedState</a></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Inherited from <a href="_stablelib_sha256.SHA256.html">SHA256</a>.<a href="_stablelib_sha256.SHA256.html#cleanSavedState">cleanSavedState</a></p><ul><li>Defined in sha256/lib/sha256.d.ts:64</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited"><a id="digest" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>digest</span><a href="#digest" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited"><li class="tsd-signature tsd-anchor-link"><a id="digest.digest-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">digest</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Uint8Array</span><a href="#digest.digest-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Returns the final hash digest.</p>
</div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Uint8Array</span></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Inherited from <a href="_stablelib_sha256.SHA256.html">SHA256</a>.<a href="_stablelib_sha256.SHA256.html#digest">digest</a></p><ul><li>Defined in sha256/lib/sha256.d.ts:47</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited"><a id="finish" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>finish</span><a href="#finish" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited"><li class="tsd-signature tsd-anchor-link"><a id="finish.finish-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">finish</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">out</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#finish.finish-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Finalizes hash state and puts hash into out.
If hash was already finalized, puts the same value.</p>
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">out</span>: <span class="tsd-signature-type">Uint8Array</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Inherited from <a href="_stablelib_sha256.SHA256.html">SHA256</a>.<a href="_stablelib_sha256.SHA256.html#finish">finish</a></p><ul><li>Defined in sha256/lib/sha256.d.ts:43</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited"><a id="reset" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>reset</span><a href="#reset" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited"><li class="tsd-signature tsd-anchor-link"><a id="reset.reset-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">reset</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#reset.reset-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Resets hash state making it possible
to re-use this instance to hash other data.</p>
</div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Inherited from <a href="_stablelib_sha256.SHA256.html">SHA256</a>.<a href="_stablelib_sha256.SHA256.html#reset">reset</a></p><ul><li>Defined in sha256/lib/sha256.d.ts:27</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited"><a id="restoreState" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>restore<wbr/>State</span><a href="#restoreState" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited"><li class="tsd-signature tsd-anchor-link"><a id="restoreState.restoreState-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">restore<wbr/>State</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">savedState</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#restoreState.restoreState-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Function useful for HMAC/PBKDF2 optimization.
Restores state saved by saveState() and sets bytesHashed
to the given value.</p>
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">savedState</span>: <a href="../types/_stablelib_sha256.SavedState.html" class="tsd-signature-type tsd-kind-type-alias">SavedState</a></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Inherited from <a href="_stablelib_sha256.SHA256.html">SHA256</a>.<a href="_stablelib_sha256.SHA256.html#restoreState">restoreState</a></p><ul><li>Defined in sha256/lib/sha256.d.ts:60</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited"><a id="saveState" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>save<wbr/>State</span><a href="#saveState" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited"><li class="tsd-signature tsd-anchor-link"><a id="saveState.saveState-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">save<wbr/>State</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../types/_stablelib_sha256.SavedState.html" class="tsd-signature-type tsd-kind-type-alias">SavedState</a><a href="#saveState.saveState-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Function useful for HMAC/PBKDF2 optimization.
Returns hash state to be used with restoreState().
Only chain value is saved, not buffers or other
state variables.</p>
</div><h4 class="tsd-returns-title">Returns <a href="../types/_stablelib_sha256.SavedState.html" class="tsd-signature-type tsd-kind-type-alias">SavedState</a></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Inherited from <a href="_stablelib_sha256.SHA256.html">SHA256</a>.<a href="_stablelib_sha256.SHA256.html#saveState">saveState</a></p><ul><li>Defined in sha256/lib/sha256.d.ts:54</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited"><a id="update" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>update</span><a href="#update" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited"><li class="tsd-signature tsd-anchor-link"><a id="update.update-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">update</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">data</span>, <span class="tsd-kind-parameter">dataLength</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#update.update-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Updates hash state with the given data.</p>
<p>Throws error when trying to update already finalized hash:
instance must be reset to update it again.</p>
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">data</span>: <span class="tsd-signature-type">Uint8Array</span></span></li><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">dataLength</span>: <span class="tsd-signature-type">number</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Inherited from <a href="_stablelib_sha256.SHA256.html">SHA256</a>.<a href="_stablelib_sha256.SHA256.html#update">update</a></p><ul><li>Defined in sha256/lib/sha256.d.ts:38</li></ul></aside></li></ul></section></section></details></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="tsd-otp-Constructors"><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Constructors</summary><div><a href="#constructor" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a></div></details><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="tsd-otp-Properties"><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Properties</summary><div><a href="#_state" class="tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>_state</span></a><a href="#blockSize" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>block<wbr/>Size</span></a><a href="#digestLength" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>digest<wbr/>Length</span></a></div></details><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="tsd-otp-Methods"><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Methods</summary><div><a href="#_initState" class="tsd-is-protected"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>_init<wbr/>State</span></a><a href="#clean" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>clean</span></a><a href="#cleanSavedState" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>clean<wbr/>Saved<wbr/>State</span></a><a href="#digest" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>digest</span></a><a href="#finish" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>finish</span></a><a href="#reset" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>reset</span></a><a href="#restoreState" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>restore<wbr/>State</span></a><a href="#saveState" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>save<wbr/>State</span></a><a href="#update" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>update</span></a></div></details></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../index.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1"></use></svg><span>StableLib</span></a><ul class="tsd-small-nested-navigation" id="tsd-nav-container" data-base=".."><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>