Documentation for db149bf3b7

This commit is contained in:
github-actions
2022-09-02 14:36:25 +00:00
parent ca6acdc719
commit 766f10286e
5464 changed files with 92674 additions and 78796 deletions

View File

@@ -1,9 +1,9 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<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.4"/>
<meta name="generator" content="Doxygen 1.9.5"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Algorithms_in_C++: ciphers/hill_cipher.cpp File Reference</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
@@ -41,10 +41,10 @@ MathJax.Hub.Config({
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.4 -->
<!-- Generated by Doxygen 1.9.5 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "../../search",'Search','.html');
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="../../menudata.js"></script>
@@ -84,9 +84,16 @@ $(document).ready(function(){initNavTree('d7/db9/hill__cipher_8cpp.html','../../
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
<div class="header">
@@ -114,7 +121,7 @@ $(document).ready(function(){initNavTree('d7/db9/hill__cipher_8cpp.html','../../
</div><div class="textblock"><div class="dynheader">
Include dependency graph for hill_cipher.cpp:</div>
<div class="dyncontent">
<div class="center"><div class="zoom"><iframe scrolling="no" frameborder="0" src="../../d3/d1a/hill__cipher_8cpp__incl.svg" width="100%" height="451"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
<div class="center"><div class="zoom"><iframe scrolling="no" frameborder="0" src="../../d3/d1a/hill__cipher_8cpp__incl.svg" width="100%" height="448"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
</div>
</div>
</div><table class="memberdecls">
@@ -156,14 +163,14 @@ Variables</h2></td></tr>
<li>its determinant must not have any common factors with the length of character set Due to this restriction, most implementations only implement with small 3x3 encryption keys and a small subset of ASCII alphabets.</li>
</ol>
<p >In the current implementation, I present to you an implementation for generating larger encryption keys (I have attempted upto 10x10) and an ASCII character set of 97 printable characters. Hence, a typical ASCII text file could be easily encrypted with the module. The larger character set increases the modulo of cipher and hence the matrix determinants can get very large very quickly rendering them ill-defined.</p>
<dl class="section note"><dt>Note</dt><dd>This program uses determinant computation using LU decomposition from the file lu_decomposition.h </dd>
<dl class="section note"><dt>Note</dt><dd>This program uses determinant computation using LU decomposition from the file <a class="el" href="../../d1/dbe/lu__decomposition_8h.html" title="Functions associated with LU Decomposition of a square matrix.">lu_decomposition.h</a> </dd>
<dd>
The matrix generation algorithm is very rudimentary and does not guarantee an invertible modulus matrix. </dd></dl>
<dl class="todo"><dt><b><a class="el" href="../../dd/da0/todo.html#_todo000001">Todo:</a></b></dt><dd>Better matrix generation algorithm.</dd></dl>
<dl class="section author"><dt>Author</dt><dd><a href="https://github.com/kvedala" target="_blank">Krishna Vedala</a> </dd></dl>
</div><h2 class="groupheader">Function Documentation</h2>
<a id="ae66f6b31b5ad750f1fe042a706a4e3d4" name="ae66f6b31b5ad750f1fe042a706a4e3d4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae66f6b31b5ad750f1fe042a706a4e3d4">&#9670;&nbsp;</a></span>main()</h2>
<h2 class="memtitle"><span class="permalink"><a href="#ae66f6b31b5ad750f1fe042a706a4e3d4">&#9670;&#160;</a></span>main()</h2>
<div class="memitem">
<div class="memproto">
@@ -185,15 +192,15 @@ The matrix generation algorithm is very rudimentary and does not guarantee an in
<div class="line"><span class="lineno"> 536</span> </div>
<div class="line"><span class="lineno"> 537</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> text = <span class="stringliteral">&quot;This is a simple text with numb3r5 and exclamat!0n.&quot;</span>;</div>
<div class="line"><span class="lineno"> 538</span> </div>
<div class="line"><span class="lineno"> 539</span> <a class="code hl_function" href="../../d7/db9/hill__cipher_8cpp.html#a3147ad576f8a94a2a6b66948672b452b">test1</a>(text);</div>
<div class="line"><span class="lineno"> 540</span> <a class="code hl_function" href="../../d7/db9/hill__cipher_8cpp.html#a04391124480d2a49f2dec900237b0712">test2</a>(text);</div>
<div class="line"><span class="lineno"> 539</span> <a class="code hl_function" href="../../d3/dae/dsu__path__compression_8cpp.html#ae7880ce913f3058a35ff106d5be9e243">test1</a>(text);</div>
<div class="line"><span class="lineno"> 540</span> <a class="code hl_function" href="../../d3/dae/dsu__path__compression_8cpp.html#a45d94ead4cf4e1ff9f87c38bc99f59ae">test2</a>(text);</div>
<div class="line"><span class="lineno"> 541</span> </div>
<div class="line"><span class="lineno"> 542</span> <span class="keywordflow">return</span> 0;</div>
<div class="line"><span class="lineno"> 543</span>}</div>
<div class="ttc" id="abasic_ostream_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a></div></div>
<div class="ttc" id="abasic_string_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a></div></div>
<div class="ttc" id="ahill__cipher_8cpp_html_a04391124480d2a49f2dec900237b0712"><div class="ttname"><a href="../../d7/db9/hill__cipher_8cpp.html#a04391124480d2a49f2dec900237b0712">test2</a></div><div class="ttdeci">void test2(const std::string &amp;text)</div><div class="ttdoc">Self test 2 - using 8x8 randomly generated key.</div><div class="ttdef"><b>Definition:</b> hill_cipher.cpp:505</div></div>
<div class="ttc" id="ahill__cipher_8cpp_html_a3147ad576f8a94a2a6b66948672b452b"><div class="ttname"><a href="../../d7/db9/hill__cipher_8cpp.html#a3147ad576f8a94a2a6b66948672b452b">test1</a></div><div class="ttdeci">void test1(const std::string &amp;text)</div><div class="ttdoc">Self test 1 - using 3x3 randomly generated key.</div><div class="ttdef"><b>Definition:</b> hill_cipher.cpp:470</div></div>
<div class="ttc" id="adsu__path__compression_8cpp_html_a45d94ead4cf4e1ff9f87c38bc99f59ae"><div class="ttname"><a href="../../d3/dae/dsu__path__compression_8cpp.html#a45d94ead4cf4e1ff9f87c38bc99f59ae">test2</a></div><div class="ttdeci">static void test2()</div><div class="ttdoc">Self-implementations, 2nd test.</div><div class="ttdef"><b>Definition:</b> dsu_path_compression.cpp:186</div></div>
<div class="ttc" id="adsu__path__compression_8cpp_html_ae7880ce913f3058a35ff106d5be9e243"><div class="ttname"><a href="../../d3/dae/dsu__path__compression_8cpp.html#ae7880ce913f3058a35ff106d5be9e243">test1</a></div><div class="ttdeci">static void test1()</div><div class="ttdoc">Self-test implementations, 1st test.</div><div class="ttdef"><b>Definition:</b> dsu_path_compression.cpp:169</div></div>
<div class="ttc" id="anamespaceciphers_html_ab9aec0ccf4b6809f652bb540be87c216"><div class="ttname"><a href="../../d6/d4e/namespaceciphers.html#ab9aec0ccf4b6809f652bb540be87c216">ciphers::STRKEY</a></div><div class="ttdeci">static const char * STRKEY</div><div class="ttdef"><b>Definition:</b> hill_cipher.cpp:73</div></div>
<div class="ttc" id="asrand_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/numeric/random/srand.html">std::srand</a></div><div class="ttdeci">T srand(T... args)</div></div>
<div class="ttc" id="astrlen_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/string/byte/strlen.html">std::strlen</a></div><div class="ttdeci">T strlen(T... args)</div></div>
@@ -201,14 +208,14 @@ The matrix generation algorithm is very rudimentary and does not guarantee an in
</div><!-- fragment --><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><div class="zoom"><iframe scrolling="no" frameborder="0" src="../../d7/db9/hill__cipher_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.svg" width="100%" height="600"><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="../../d7/db9/hill__cipher_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.svg" width="632" height="410"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
</div>
</div>
</div>
<a id="a34bfcd756610834acac501f9eea1e2eb" name="a34bfcd756610834acac501f9eea1e2eb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a34bfcd756610834acac501f9eea1e2eb">&#9670;&nbsp;</a></span>operator&lt;&lt;()</h2>
<h2 class="memtitle"><span class="permalink"><a href="#a34bfcd756610834acac501f9eea1e2eb">&#9670;&#160;</a></span>operator&lt;&lt;()</h2>
<div class="memitem">
<div class="memproto">
@@ -264,14 +271,14 @@ template&lt;typename T &gt; </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="../../d7/db9/hill__cipher_8cpp_a34bfcd756610834acac501f9eea1e2eb_cgraph.svg" width="260" height="240"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
<div class="center"><iframe scrolling="no" frameborder="0" src="../../d7/db9/hill__cipher_8cpp_a34bfcd756610834acac501f9eea1e2eb_cgraph.svg" width="260" height="234"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
</div>
</div>
</div>
<a id="a3147ad576f8a94a2a6b66948672b452b" name="a3147ad576f8a94a2a6b66948672b452b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3147ad576f8a94a2a6b66948672b452b">&#9670;&nbsp;</a></span>test1()</h2>
<h2 class="memtitle"><span class="permalink"><a href="#a3147ad576f8a94a2a6b66948672b452b">&#9670;&#160;</a></span>test1()</h2>
<div class="memitem">
<div class="memproto">
@@ -331,14 +338,14 @@ Here is the call graph for this function:</div>
</div><!-- fragment --><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><div class="zoom"><iframe scrolling="no" frameborder="0" src="../../d7/db9/hill__cipher_8cpp_a3147ad576f8a94a2a6b66948672b452b_cgraph.svg" width="100%" height="591"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
<div class="center"><div class="zoom"><iframe scrolling="no" frameborder="0" src="../../d7/db9/hill__cipher_8cpp_a3147ad576f8a94a2a6b66948672b452b_cgraph.svg" width="100%" height="600"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
</div>
</div>
</div>
</div>
<a id="a04391124480d2a49f2dec900237b0712" name="a04391124480d2a49f2dec900237b0712"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a04391124480d2a49f2dec900237b0712">&#9670;&nbsp;</a></span>test2()</h2>
<h2 class="memtitle"><span class="permalink"><a href="#a04391124480d2a49f2dec900237b0712">&#9670;&#160;</a></span>test2()</h2>
<div class="memitem">
<div class="memproto">
@@ -401,7 +408,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_4d6e05837bf820fb089a8a8cdf2f42b7.html">ciphers</a></li><li class="navelem"><a class="el" href="../../d7/db9/hill__cipher_8cpp.html">hill_cipher.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.4 </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.5 </li>
</ul>
</div>
</body>