Documentation for 2dadbf73f4

This commit is contained in:
github-actions
2024-02-12 20:07:08 +00:00
parent b5b4d78981
commit a1eb9bd385
1261 changed files with 30404 additions and 29974 deletions

View File

@@ -3,16 +3,18 @@
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.8"/>
<meta name="generator" content="Doxygen 1.10.0"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Algorithms_in_C++: hashing/sha1.cpp File Reference</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../jquery.js"></script>
<script type="text/javascript" src="../../dynsections.js"></script>
<script type="text/javascript" src="../../clipboard.js"></script>
<link href="../../navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../resize.js"></script>
<script type="text/javascript" src="../../navtreedata.js"></script>
<script type="text/javascript" src="../../navtree.js"></script>
<script type="text/javascript" src="../../cookie.js"></script>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../search/searchdata.js"></script>
<script type="text/javascript" src="../../search/search.js"></script>
@@ -41,7 +43,7 @@ MathJax.Hub.Config({
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.8 -->
<!-- Generated by Doxygen 1.10.0 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
@@ -53,7 +55,7 @@ var searchBox = new SearchBox("searchBox", "../../search/",'.html');
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('../../',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
$(function() { init_search(); });
});
/* @license-end */
</script>
@@ -71,7 +73,7 @@ $(function() {
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('d8/d7a/sha1_8cpp.html','../../'); initResizable(); });
$(function(){initNavTree('d8/d7a/sha1_8cpp.html','../../'); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
@@ -130,25 +132,25 @@ Namespaces</h2></td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:acf6bd970f29a68702bdbdfe8338e45e0" id="r_acf6bd970f29a68702bdbdfe8338e45e0"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/d7a/sha1_8cpp.html#acf6bd970f29a68702bdbdfe8338e45e0">hashing::sha1::leftRotate32bits</a> (uint32_t n, <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/types/size_t.html">std::size_t</a> rotate)</td></tr>
<tr class="memitem:acf6bd970f29a68702bdbdfe8338e45e0" id="r_acf6bd970f29a68702bdbdfe8338e45e0"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#acf6bd970f29a68702bdbdfe8338e45e0">hashing::sha1::leftRotate32bits</a> (uint32_t n, <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/types/size_t.html">std::size_t</a> rotate)</td></tr>
<tr class="memdesc:acf6bd970f29a68702bdbdfe8338e45e0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Rotates the bits of a 32-bit unsigned integer. <br /></td></tr>
<tr class="separator:acf6bd970f29a68702bdbdfe8338e45e0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aada0803ef851d831b7a290a924e3c228" id="r_aada0803ef851d831b7a290a924e3c228"><td class="memItemLeft" align="right" valign="top"><a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/d7a/sha1_8cpp.html#aada0803ef851d831b7a290a924e3c228">hashing::sha1::sig2hex</a> (void *sig)</td></tr>
<tr class="memitem:aada0803ef851d831b7a290a924e3c228" id="r_aada0803ef851d831b7a290a924e3c228"><td class="memItemLeft" align="right" valign="top"><a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#aada0803ef851d831b7a290a924e3c228">hashing::sha1::sig2hex</a> (void *sig)</td></tr>
<tr class="memdesc:aada0803ef851d831b7a290a924e3c228"><td class="mdescLeft">&#160;</td><td class="mdescRight">Transforms the 160-bit SHA-1 signature into a 40 char hex string. <br /></td></tr>
<tr class="separator:aada0803ef851d831b7a290a924e3c228"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7be3471f7e489d7d0df42b97a48bf141" id="r_a7be3471f7e489d7d0df42b97a48bf141"><td class="memItemLeft" align="right" valign="top">void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/d7a/sha1_8cpp.html#a7be3471f7e489d7d0df42b97a48bf141">hashing::sha1::hash_bs</a> (const void *input_bs, uint64_t input_size)</td></tr>
<tr class="memitem:a7be3471f7e489d7d0df42b97a48bf141" id="r_a7be3471f7e489d7d0df42b97a48bf141"><td class="memItemLeft" align="right" valign="top">void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a7be3471f7e489d7d0df42b97a48bf141">hashing::sha1::hash_bs</a> (const void *input_bs, uint64_t input_size)</td></tr>
<tr class="memdesc:a7be3471f7e489d7d0df42b97a48bf141"><td class="mdescLeft">&#160;</td><td class="mdescRight">The SHA-1 algorithm itself, taking in a bytestring. <br /></td></tr>
<tr class="separator:a7be3471f7e489d7d0df42b97a48bf141"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2397f2444a05e4d1487c67e215410d3c" id="r_a2397f2444a05e4d1487c67e215410d3c"><td class="memItemLeft" align="right" valign="top">void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/d7a/sha1_8cpp.html#a2397f2444a05e4d1487c67e215410d3c">hashing::sha1::hash</a> (const <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> &amp;message)</td></tr>
<tr class="memitem:a2397f2444a05e4d1487c67e215410d3c" id="r_a2397f2444a05e4d1487c67e215410d3c"><td class="memItemLeft" align="right" valign="top">void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a2397f2444a05e4d1487c67e215410d3c">hashing::sha1::hash</a> (const <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> &amp;message)</td></tr>
<tr class="memdesc:a2397f2444a05e4d1487c67e215410d3c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Converts the string to bytestring and calls the main algorithm. <br /></td></tr>
<tr class="separator:a2397f2444a05e4d1487c67e215410d3c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa8dca7b867074164d5f45b0f3851269d" id="r_aa8dca7b867074164d5f45b0f3851269d"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/d7a/sha1_8cpp.html#aa8dca7b867074164d5f45b0f3851269d">test</a> ()</td></tr>
<tr class="memitem:aa8dca7b867074164d5f45b0f3851269d" id="r_aa8dca7b867074164d5f45b0f3851269d"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#aa8dca7b867074164d5f45b0f3851269d">test</a> ()</td></tr>
<tr class="memdesc:aa8dca7b867074164d5f45b0f3851269d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Self-test implementations of well-known SHA-1 hashes. <br /></td></tr>
<tr class="separator:aa8dca7b867074164d5f45b0f3851269d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac9e1a11f44135b890dd10a00e73b5661" id="r_ac9e1a11f44135b890dd10a00e73b5661"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/d7a/sha1_8cpp.html#ac9e1a11f44135b890dd10a00e73b5661">interactive</a> ()</td></tr>
<tr class="memitem:ac9e1a11f44135b890dd10a00e73b5661" id="r_ac9e1a11f44135b890dd10a00e73b5661"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ac9e1a11f44135b890dd10a00e73b5661">interactive</a> ()</td></tr>
<tr class="memdesc:ac9e1a11f44135b890dd10a00e73b5661"><td class="mdescLeft">&#160;</td><td class="mdescRight">Puts user in a loop where inputs can be given and SHA-1 hash will be computed and printed. <br /></td></tr>
<tr class="separator:ac9e1a11f44135b890dd10a00e73b5661"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae66f6b31b5ad750f1fe042a706a4e3d4" id="r_ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/d7a/sha1_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main</a> ()</td></tr>
<tr class="memitem:ae66f6b31b5ad750f1fe042a706a4e3d4" id="r_ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ae66f6b31b5ad750f1fe042a706a4e3d4">main</a> ()</td></tr>
<tr class="memdesc:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Main function. <br /></td></tr>
<tr class="separator:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
@@ -170,8 +172,7 @@ Algorithm</h3>
<tr>
<td class="memname">void * hashing::sha1::hash </td>
<td>(</td>
<td class="paramtype">const <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> &amp;&#160;</td>
<td class="paramname"><em>message</em></td><td>)</td>
<td class="paramtype">const <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> &amp;</td> <td class="paramname"><span class="paramname"><em>message</em></span></td><td>)</td>
<td></td>
</tr>
</table>
@@ -207,19 +208,12 @@ Here is the call graph for this function:</div>
<tr>
<td class="memname">void * hashing::sha1::hash_bs </td>
<td>(</td>
<td class="paramtype">const void *&#160;</td>
<td class="paramname"><em>input_bs</em>, </td>
<td class="paramtype">const void *</td> <td class="paramname"><span class="paramname"><em>input_bs</em>, </span></td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint64_t&#160;</td>
<td class="paramname"><em>input_size</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
<td class="paramtype">uint64_t</td> <td class="paramname"><span class="paramname"><em>input_size</em></span>&#160;)</td>
</tr>
</table>
</div><div class="memdoc">
@@ -379,7 +373,7 @@ Here is the call graph for this function:</div>
<tr>
<td class="memname">static void interactive </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td class="paramname"><span class="paramname"></span></td><td>)</td>
<td></td>
</tr>
</table>
@@ -398,8 +392,8 @@ Here is the call graph for this function:</div>
<div class="line"><span class="lineno"> 277</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;Enter a message to be hashed (Ctrl-C to exit): &quot;</span></div>
<div class="line"><span class="lineno"> 278</span> &lt;&lt; <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><span class="lineno"> 279</span> <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string/getline.html">std::getline</a>(<a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_istream.html">std::cin</a>, input);</div>
<div class="line"><span class="lineno"> 280</span> <span class="keywordtype">void</span>* sig = <a class="code hl_function" href="../../d8/d7a/sha1_8cpp.html#a2397f2444a05e4d1487c67e215410d3c">hashing::sha1::hash</a>(input);</div>
<div class="line"><span class="lineno"> 281</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;Hash is: &quot;</span> &lt;&lt; <a class="code hl_function" href="../../d8/d7a/sha1_8cpp.html#aada0803ef851d831b7a290a924e3c228">hashing::sha1::sig2hex</a>(sig) &lt;&lt; <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><span class="lineno"> 280</span> <span class="keywordtype">void</span>* sig = <a class="code hl_function" href="#a2397f2444a05e4d1487c67e215410d3c">hashing::sha1::hash</a>(input);</div>
<div class="line"><span class="lineno"> 281</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;Hash is: &quot;</span> &lt;&lt; <a class="code hl_function" href="#aada0803ef851d831b7a290a924e3c228">hashing::sha1::sig2hex</a>(sig) &lt;&lt; <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><span class="lineno"> 282</span> </div>
<div class="line"><span class="lineno"> 283</span> <span class="keywordflow">while</span> (<span class="keyword">true</span>) {</div>
<div class="line"><span class="lineno"> 284</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;Want to enter another message? (y/n) &quot;</span>;</div>
@@ -418,8 +412,8 @@ Here is the call graph for this function:</div>
<div class="ttc" id="acompare_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/string/basic_string/compare.html">std::string::compare</a></div><div class="ttdeci">T compare(T... args)</div></div>
<div class="ttc" id="aendl_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a></div><div class="ttdeci">T endl(T... args)</div></div>
<div class="ttc" id="agetline_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/string/basic_string/getline.html">std::getline</a></div><div class="ttdeci">T getline(T... args)</div></div>
<div class="ttc" id="asha1_8cpp_html_a2397f2444a05e4d1487c67e215410d3c"><div class="ttname"><a href="../../d8/d7a/sha1_8cpp.html#a2397f2444a05e4d1487c67e215410d3c">hashing::sha1::hash</a></div><div class="ttdeci">void * hash(const std::string &amp;message)</div><div class="ttdoc">Converts the string to bytestring and calls the main algorithm.</div><div class="ttdef"><b>Definition</b> sha1.cpp:210</div></div>
<div class="ttc" id="asha1_8cpp_html_aada0803ef851d831b7a290a924e3c228"><div class="ttname"><a href="../../d8/d7a/sha1_8cpp.html#aada0803ef851d831b7a290a924e3c228">hashing::sha1::sig2hex</a></div><div class="ttdeci">std::string sig2hex(void *sig)</div><div class="ttdoc">Transforms the 160-bit SHA-1 signature into a 40 char hex string.</div><div class="ttdef"><b>Definition</b> sha1.cpp:66</div></div>
<div class="ttc" id="asha1_8cpp_html_a2397f2444a05e4d1487c67e215410d3c"><div class="ttname"><a href="#a2397f2444a05e4d1487c67e215410d3c">hashing::sha1::hash</a></div><div class="ttdeci">void * hash(const std::string &amp;message)</div><div class="ttdoc">Converts the string to bytestring and calls the main algorithm.</div><div class="ttdef"><b>Definition</b> sha1.cpp:210</div></div>
<div class="ttc" id="asha1_8cpp_html_aada0803ef851d831b7a290a924e3c228"><div class="ttname"><a href="#aada0803ef851d831b7a290a924e3c228">hashing::sha1::sig2hex</a></div><div class="ttdeci">std::string sig2hex(void *sig)</div><div class="ttdoc">Transforms the 160-bit SHA-1 signature into a 40 char hex string.</div><div class="ttdef"><b>Definition</b> sha1.cpp:66</div></div>
</div><!-- fragment --><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
@@ -437,19 +431,12 @@ Here is the call graph for this function:</div>
<tr>
<td class="memname">uint32_t hashing::sha1::leftRotate32bits </td>
<td>(</td>
<td class="paramtype">uint32_t&#160;</td>
<td class="paramname"><em>n</em>, </td>
<td class="paramtype">uint32_t</td> <td class="paramname"><span class="paramname"><em>n</em>, </span></td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/types/size_t.html">std::size_t</a>&#160;</td>
<td class="paramname"><em>rotate</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
<td class="paramtype"><a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/types/size_t.html">std::size_t</a></td> <td class="paramname"><span class="paramname"><em>rotate</em></span>&#160;)</td>
</tr>
</table>
</div><div class="memdoc">
@@ -479,8 +466,7 @@ Here is the call graph for this function:</div>
<tr>
<td class="memname">int main </td>
<td>(</td>
<td class="paramtype">void&#160;</td>
<td class="paramname"></td><td>)</td>
<td class="paramtype">void</td> <td class="paramname"><span class="paramname"></span></td><td>)</td>
<td></td>
</tr>
</table>
@@ -489,19 +475,19 @@ Here is the call graph for this function:</div>
<p>Main function. </p>
<dl class="section return"><dt>Returns</dt><dd>0 on exit </dd></dl>
<div class="fragment"><div class="line"><span class="lineno"> 299</span> {</div>
<div class="line"><span class="lineno"> 300</span> <a class="code hl_function" href="../../d8/d7a/sha1_8cpp.html#aa8dca7b867074164d5f45b0f3851269d">test</a>(); <span class="comment">// run self-test implementations</span></div>
<div class="line"><span class="lineno"> 300</span> <a class="code hl_function" href="#aa8dca7b867074164d5f45b0f3851269d">test</a>(); <span class="comment">// run self-test implementations</span></div>
<div class="line"><span class="lineno"> 301</span> </div>
<div class="line"><span class="lineno"> 302</span> <span class="comment">// Launch interactive mode where user can input messages and see</span></div>
<div class="line"><span class="lineno"> 303</span> <span class="comment">// their hash</span></div>
<div class="line"><span class="lineno"> 304</span> <a class="code hl_function" href="../../d8/d7a/sha1_8cpp.html#ac9e1a11f44135b890dd10a00e73b5661">interactive</a>();</div>
<div class="line"><span class="lineno"> 304</span> <a class="code hl_function" href="#ac9e1a11f44135b890dd10a00e73b5661">interactive</a>();</div>
<div class="line"><span class="lineno"> 305</span> <span class="keywordflow">return</span> 0;</div>
<div class="line"><span class="lineno"> 306</span>}</div>
<div class="ttc" id="asha1_8cpp_html_aa8dca7b867074164d5f45b0f3851269d"><div class="ttname"><a href="../../d8/d7a/sha1_8cpp.html#aa8dca7b867074164d5f45b0f3851269d">test</a></div><div class="ttdeci">static void test()</div><div class="ttdoc">Self-test implementations of well-known SHA-1 hashes.</div><div class="ttdef"><b>Definition</b> sha1.cpp:220</div></div>
<div class="ttc" id="asha1_8cpp_html_ac9e1a11f44135b890dd10a00e73b5661"><div class="ttname"><a href="../../d8/d7a/sha1_8cpp.html#ac9e1a11f44135b890dd10a00e73b5661">interactive</a></div><div class="ttdeci">static void interactive()</div><div class="ttdoc">Puts user in a loop where inputs can be given and SHA-1 hash will be computed and printed.</div><div class="ttdef"><b>Definition</b> sha1.cpp:274</div></div>
<div class="ttc" id="asha1_8cpp_html_aa8dca7b867074164d5f45b0f3851269d"><div class="ttname"><a href="#aa8dca7b867074164d5f45b0f3851269d">test</a></div><div class="ttdeci">static void test()</div><div class="ttdoc">Self-test implementations of well-known SHA-1 hashes.</div><div class="ttdef"><b>Definition</b> sha1.cpp:220</div></div>
<div class="ttc" id="asha1_8cpp_html_ac9e1a11f44135b890dd10a00e73b5661"><div class="ttname"><a href="#ac9e1a11f44135b890dd10a00e73b5661">interactive</a></div><div class="ttdeci">static void interactive()</div><div class="ttdoc">Puts user in a loop where inputs can be given and SHA-1 hash will be computed and printed.</div><div class="ttdef"><b>Definition</b> sha1.cpp:274</div></div>
</div><!-- fragment --><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><iframe scrolling="no" frameborder="0" src="../../d8/d7a/sha1_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.svg" width="375" height="135"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
<div class="center"><iframe scrolling="no" frameborder="0" src="../../d8/d7a/sha1_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.svg" width="375" height="184"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
</div>
</div>
@@ -515,8 +501,7 @@ Here is the call graph for this function:</div>
<tr>
<td class="memname"><a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> hashing::sha1::sig2hex </td>
<td>(</td>
<td class="paramtype">void *&#160;</td>
<td class="paramname"><em>sig</em></td><td>)</td>
<td class="paramtype">void *</td> <td class="paramname"><span class="paramname"><em>sig</em></span></td><td>)</td>
<td></td>
</tr>
</table>
@@ -556,7 +541,7 @@ Here is the call graph for this function:</div>
<tr>
<td class="memname">static void test </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td class="paramname"><span class="paramname"></span></td><td>)</td>
<td></td>
</tr>
</table>
@@ -571,57 +556,57 @@ Here is the call graph for this function:</div>
<dl class="section return"><dt>Returns</dt><dd>void </dd></dl>
<div class="fragment"><div class="line"><span class="lineno"> 220</span> {</div>
<div class="line"><span class="lineno"> 221</span> <span class="comment">// Hashes empty string and stores signature</span></div>
<div class="line"><span class="lineno"> 222</span> <span class="keywordtype">void</span>* sig = <a class="code hl_function" href="../../d8/d7a/sha1_8cpp.html#a2397f2444a05e4d1487c67e215410d3c">hashing::sha1::hash</a>(<span class="stringliteral">&quot;&quot;</span>);</div>
<div class="line"><span class="lineno"> 222</span> <span class="keywordtype">void</span>* sig = <a class="code hl_function" href="#a2397f2444a05e4d1487c67e215410d3c">hashing::sha1::hash</a>(<span class="stringliteral">&quot;&quot;</span>);</div>
<div class="line"><span class="lineno"> 223</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;Hashing empty string&quot;</span> &lt;&lt; <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><span class="lineno"> 224</span> <span class="comment">// Prints signature hex representation</span></div>
<div class="line"><span class="lineno"> 225</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <a class="code hl_function" href="../../d8/d7a/sha1_8cpp.html#aada0803ef851d831b7a290a924e3c228">hashing::sha1::sig2hex</a>(sig) &lt;&lt; <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a> &lt;&lt; <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><span class="lineno"> 225</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <a class="code hl_function" href="#aada0803ef851d831b7a290a924e3c228">hashing::sha1::sig2hex</a>(sig) &lt;&lt; <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a> &lt;&lt; <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><span class="lineno"> 226</span> <span class="comment">// Test with cassert wether sig is correct from expected value</span></div>
<div class="line"><span class="lineno"> 227</span> assert(hashing::sha1::sig2hex(sig).<a class="code hl_struct" href="../../d1/db3/structcompare.html">compare</a>(</div>
<div class="line"><span class="lineno"> 227</span> assert(hashing::sha1::sig2hex(sig).<a class="code hl_function" href="../../d4/d7a/shell__sort2_8cpp.html#a7eb77daed2cf1513f6d68c47a1c2db1c">compare</a>(</div>
<div class="line"><span class="lineno"> 228</span> <span class="stringliteral">&quot;da39a3ee5e6b4b0d3255bfef95601890afd80709&quot;</span>) == 0);</div>
<div class="line"><span class="lineno"> 229</span> </div>
<div class="line"><span class="lineno"> 230</span> <span class="comment">// Hashes &quot;The quick brown fox jumps over the lazy dog&quot; and stores signature</span></div>
<div class="line"><span class="lineno"> 231</span> <span class="keywordtype">void</span>* sig2 =</div>
<div class="line"><span class="lineno"> 232</span> <a class="code hl_function" href="../../d8/d7a/sha1_8cpp.html#a2397f2444a05e4d1487c67e215410d3c">hashing::sha1::hash</a>(<span class="stringliteral">&quot;The quick brown fox jumps over the lazy dog&quot;</span>);</div>
<div class="line"><span class="lineno"> 232</span> <a class="code hl_function" href="#a2397f2444a05e4d1487c67e215410d3c">hashing::sha1::hash</a>(<span class="stringliteral">&quot;The quick brown fox jumps over the lazy dog&quot;</span>);</div>
<div class="line"><span class="lineno"> 233</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;Hashing The quick brown fox jumps over the lazy dog&quot;</span></div>
<div class="line"><span class="lineno"> 234</span> &lt;&lt; <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><span class="lineno"> 235</span> <span class="comment">// Prints signature hex representation</span></div>
<div class="line"><span class="lineno"> 236</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <a class="code hl_function" href="../../d8/d7a/sha1_8cpp.html#aada0803ef851d831b7a290a924e3c228">hashing::sha1::sig2hex</a>(sig2) &lt;&lt; <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a> &lt;&lt; <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><span class="lineno"> 236</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <a class="code hl_function" href="#aada0803ef851d831b7a290a924e3c228">hashing::sha1::sig2hex</a>(sig2) &lt;&lt; <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a> &lt;&lt; <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><span class="lineno"> 237</span> <span class="comment">// Test with cassert wether sig is correct from expected value</span></div>
<div class="line"><span class="lineno"> 238</span> assert(hashing::sha1::sig2hex(sig2).<a class="code hl_struct" href="../../d1/db3/structcompare.html">compare</a>(</div>
<div class="line"><span class="lineno"> 238</span> assert(hashing::sha1::sig2hex(sig2).<a class="code hl_function" href="../../d4/d7a/shell__sort2_8cpp.html#a7eb77daed2cf1513f6d68c47a1c2db1c">compare</a>(</div>
<div class="line"><span class="lineno"> 239</span> <span class="stringliteral">&quot;2fd4e1c67a2d28fced849ee1bb76e7391b93eb12&quot;</span>) == 0);</div>
<div class="line"><span class="lineno"> 240</span> </div>
<div class="line"><span class="lineno"> 241</span> <span class="comment">// Hashes &quot;The quick brown fox jumps over the lazy dog.&quot; (notice the</span></div>
<div class="line"><span class="lineno"> 242</span> <span class="comment">// additional period) and stores signature</span></div>
<div class="line"><span class="lineno"> 243</span> <span class="keywordtype">void</span>* sig3 =</div>
<div class="line"><span class="lineno"> 244</span> <a class="code hl_function" href="../../d8/d7a/sha1_8cpp.html#a2397f2444a05e4d1487c67e215410d3c">hashing::sha1::hash</a>(<span class="stringliteral">&quot;The quick brown fox jumps over the lazy dog.&quot;</span>);</div>
<div class="line"><span class="lineno"> 244</span> <a class="code hl_function" href="#a2397f2444a05e4d1487c67e215410d3c">hashing::sha1::hash</a>(<span class="stringliteral">&quot;The quick brown fox jumps over the lazy dog.&quot;</span>);</div>
<div class="line"><span class="lineno"> 245</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;Hashing &quot;</span></div>
<div class="line"><span class="lineno"> 246</span> <span class="stringliteral">&quot;The quick brown fox jumps over the lazy dog.&quot;</span></div>
<div class="line"><span class="lineno"> 247</span> &lt;&lt; <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><span class="lineno"> 248</span> <span class="comment">// Prints signature hex representation</span></div>
<div class="line"><span class="lineno"> 249</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <a class="code hl_function" href="../../d8/d7a/sha1_8cpp.html#aada0803ef851d831b7a290a924e3c228">hashing::sha1::sig2hex</a>(sig3) &lt;&lt; <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a> &lt;&lt; <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><span class="lineno"> 249</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <a class="code hl_function" href="#aada0803ef851d831b7a290a924e3c228">hashing::sha1::sig2hex</a>(sig3) &lt;&lt; <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a> &lt;&lt; <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><span class="lineno"> 250</span> <span class="comment">// Test with cassert wether sig is correct from expected value</span></div>
<div class="line"><span class="lineno"> 251</span> assert(hashing::sha1::sig2hex(sig3).<a class="code hl_struct" href="../../d1/db3/structcompare.html">compare</a>(</div>
<div class="line"><span class="lineno"> 251</span> assert(hashing::sha1::sig2hex(sig3).<a class="code hl_function" href="../../d4/d7a/shell__sort2_8cpp.html#a7eb77daed2cf1513f6d68c47a1c2db1c">compare</a>(</div>
<div class="line"><span class="lineno"> 252</span> <span class="stringliteral">&quot;408d94384216f890ff7a0c3528e8bed1e0b01621&quot;</span>) == 0);</div>
<div class="line"><span class="lineno"> 253</span> </div>
<div class="line"><span class="lineno"> 254</span> <span class="comment">// Hashes &quot;ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789&quot;</span></div>
<div class="line"><span class="lineno"> 255</span> <span class="comment">// and stores signature</span></div>
<div class="line"><span class="lineno"> 256</span> <span class="keywordtype">void</span>* sig4 = <a class="code hl_function" href="../../d8/d7a/sha1_8cpp.html#a2397f2444a05e4d1487c67e215410d3c">hashing::sha1::hash</a>(</div>
<div class="line"><span class="lineno"> 256</span> <span class="keywordtype">void</span>* sig4 = <a class="code hl_function" href="#a2397f2444a05e4d1487c67e215410d3c">hashing::sha1::hash</a>(</div>
<div class="line"><span class="lineno"> 257</span> <span class="stringliteral">&quot;ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789&quot;</span>);</div>
<div class="line"><span class="lineno"> 258</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a></div>
<div class="line"><span class="lineno"> 259</span> &lt;&lt; <span class="stringliteral">&quot;Hashing &quot;</span></div>
<div class="line"><span class="lineno"> 260</span> <span class="stringliteral">&quot;ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789&quot;</span></div>
<div class="line"><span class="lineno"> 261</span> &lt;&lt; <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><span class="lineno"> 262</span> <span class="comment">// Prints signature hex representation</span></div>
<div class="line"><span class="lineno"> 263</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <a class="code hl_function" href="../../d8/d7a/sha1_8cpp.html#aada0803ef851d831b7a290a924e3c228">hashing::sha1::sig2hex</a>(sig4) &lt;&lt; <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a> &lt;&lt; <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><span class="lineno"> 263</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <a class="code hl_function" href="#aada0803ef851d831b7a290a924e3c228">hashing::sha1::sig2hex</a>(sig4) &lt;&lt; <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a> &lt;&lt; <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><span class="lineno"> 264</span> <span class="comment">// Test with cassert wether sig is correct from expected value</span></div>
<div class="line"><span class="lineno"> 265</span> assert(hashing::sha1::sig2hex(sig4).<a class="code hl_struct" href="../../d1/db3/structcompare.html">compare</a>(</div>
<div class="line"><span class="lineno"> 265</span> assert(hashing::sha1::sig2hex(sig4).<a class="code hl_function" href="../../d4/d7a/shell__sort2_8cpp.html#a7eb77daed2cf1513f6d68c47a1c2db1c">compare</a>(</div>
<div class="line"><span class="lineno"> 266</span> <span class="stringliteral">&quot;761c457bf73b14d27e9e9265c46f4b4dda11f940&quot;</span>) == 0);</div>
<div class="line"><span class="lineno"> 267</span>}</div>
<div class="ttc" id="astructcompare_html"><div class="ttname"><a href="../../d1/db3/structcompare.html">compare</a></div><div class="ttdef"><b>Definition</b> huffman.cpp:28</div></div>
<div class="ttc" id="ashell__sort2_8cpp_html_a7eb77daed2cf1513f6d68c47a1c2db1c"><div class="ttname"><a href="../../d4/d7a/shell__sort2_8cpp.html#a7eb77daed2cf1513f6d68c47a1c2db1c">compare</a></div><div class="ttdeci">int compare(const void *a, const void *b)</div><div class="ttdef"><b>Definition</b> shell_sort2.cpp:87</div></div>
</div><!-- fragment --><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><iframe scrolling="no" frameborder="0" src="../../d8/d7a/sha1_8cpp_aa8dca7b867074164d5f45b0f3851269d_cgraph.svg" width="174" height="36"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
<div class="center"><iframe scrolling="no" frameborder="0" src="../../d8/d7a/sha1_8cpp_aa8dca7b867074164d5f45b0f3851269d_cgraph.svg" width="174" height="86"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
</div>
</div>
@@ -632,7 +617,7 @@ Here is the call graph for this function:</div>
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="../../dir_ece9b94c107bbaa1dd68197a8c9983b9.html">hashing</a></li><li class="navelem"><a class="el" href="../../d8/d7a/sha1_8cpp.html">sha1.cpp</a></li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.8 </li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.10.0 </li>
</ul>
</div>
</body>