</head><bodyclass="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><navclass="mobile-topbar"><buttonclass="sidebar-menu-toggle">☰</button><aclass="logo-container"href="../../halo2_gadgets/index.html"><imgclass="rust-logo"src="../../static.files/rust-logo-151179464ae7ed46.svg"alt="logo"></a><h2></h2></nav><navclass="sidebar"><aclass="logo-container"href="../../halo2_gadgets/index.html"><imgclass="rust-logo"src="../../static.files/rust-logo-151179464ae7ed46.svg"alt="logo"></a><h2class="location"><ahref="#">Module sha256</a></h2><divclass="sidebar-elems"><section><ulclass="block"><li><ahref="#structs">Structs</a></li><li><ahref="#constants">Constants</a></li><li><ahref="#traits">Traits</a></li></ul></section></div></nav><main><divclass="width-limiter"><navclass="sub"><formclass="search-form"><span></span><inputclass="search-input"name="search"aria-label="Run search in the documentation"autocomplete="off"spellcheck="false"placeholder="Click or press ‘S’ to search, ‘?’ for more options…"type="search"><divid="help-button"title="help"tabindex="-1"><ahref="../../help.html">?</a></div><divid="settings-menu"tabindex="-1"><ahref="../../settings.html"title="settings"><imgwidth="22"height="22"alt="Change settings"src="../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><sectionid="main-content"class="content"><divclass="main-heading"><h1>Module <ahref="../index.html">halo2_gadgets</a>::<wbr><aclass="mod"href="#">sha256</a><buttonid="copy-path"title="Copy item path to clipboard"><imgsrc="../../static.files/clipboard-7571035ce49a181d.svg"width="19"height="18"alt="Copy item path"></button></h1><spanclass="out-of-band"><aclass="srclink"href="../../src/halo2_gadgets/sha256.rs.html#1-166">source</a> · <buttonid="toggle-all-docs"title="collapse all docs">[<span>−</span>]</button></span></div><spanclass="item-info"><divclass="stab portability">Available on <strong>crate feature <code>unstable-sha256-gadget</code></strong> only.</div></span><detailsclass="toggle top-doc"open><summaryclass="hideme"><span>Expand description</span></summary><divclass="docblock"><p>The <ahref="https://tools.ietf.org/html/rfc6234">SHA-256</a> hash function.</p>
</div></details><h2id="structs"class="small-section-header"><ahref="#structs">Structs</a></h2><divclass="item-table"><divclass="item-row"><divclass="item-left"><aclass="struct"href="struct.BlockWord.html"title="struct halo2_gadgets::sha256::BlockWord">BlockWord</a></div><divclass="item-right docblock-short">A word in a <code>Table16</code> message block.</div></div><divclass="item-row"><divclass="item-left"><aclass="struct"href="struct.Sha256.html"title="struct halo2_gadgets::sha256::Sha256">Sha256</a></div><divclass="item-right docblock-short">A gadget that constrains a SHA-256 invocation. It supports input at a granularity of
32 bits.</div></div><divclass="item-row"><divclass="item-left"><aclass="struct"href="struct.Sha256Digest.html"title="struct halo2_gadgets::sha256::Sha256Digest">Sha256Digest</a></div><divclass="item-right docblock-short">The output of a SHA-256 circuit invocation.</div></div><divclass="item-row"><divclass="item-left"><aclass="struct"href="struct.Table16Chip.html"title="struct halo2_gadgets::sha256::Table16Chip">Table16Chip</a></div><divclass="item-right docblock-short">A chip that implements SHA-256 with a maximum lookup table size of $2^16$.</div></div><divclass="item-row"><divclass="item-left"><aclass="struct"href="struct.Table16Config.html"title="struct halo2_gadgets::sha256::Table16Config">Table16Config</a></div><divclass="item-right docblock-short">Configuration for a <ahref="struct.Table16Chip.html"title="Table16Chip"><code>Table16Chip</code></a>.</div></div></div><h2id="constants"class="small-section-header"><ahref="#constants">Constants</a></h2><divclass="item-table"><divclass="item-row"><divclass="item-left"><aclass="constant"href="constant.BLOCK_SIZE.html"title="constant halo2_gadgets::sha256::BLOCK_SIZE">BLOCK_SIZE</a></div><divclass="item-right docblock-short">The size of a SHA-256 block, in 32-bit words.</div></div></div><h2id="traits"class="small-section-header"><ahref="#traits">Traits</a></h2><divclass="item-table"><divclass="item-row"><divclass="item-left"><aclass="trait"href="trait.Sha256Instructions.html"title="trait halo2_gadgets::sha256::Sha256Instructions">Sha256Instructions</a></div><divclass="item-right docblock-short">The set of circuit instructions required to use the <ahref="struct.Sha256.html"title="Sha256"><code>Sha256</code></a> gadget.</div></div></div></section></div></main><divid="rustdoc-vars"data-root-path="../../"data-static-root-path="../../static.files/"data-current-crate="halo2_gadgets"data-themes=""data-resource-suffix=""data-rustdoc-version="1.69.0-nightly (8996ea93b 2023-02-09)"data-search-js="search-28136cea55c34037.js"data-settings-js="settings-f0c5c39777a9a2f6.js"data-settings-css="settings-0bcba95ff279c1db.css"></div></body></html>