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++: ciphers/caesar_cipher.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('d6/d2c/caesar__cipher_8cpp.html','../../'); initResizable(); });
$(function(){initNavTree('d6/d2c/caesar__cipher_8cpp.html','../../'); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
@@ -126,13 +128,13 @@ 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:ac3381121289548640b1c27a58a8524c3" id="r_ac3381121289548640b1c27a58a8524c3"><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="../../d6/d2c/caesar__cipher_8cpp.html#ac3381121289548640b1c27a58a8524c3">ciphers::caesar::encrypt</a> (const <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> &amp;text, const int &amp;shift)</td></tr>
<tr class="memitem:ac3381121289548640b1c27a58a8524c3" id="r_ac3381121289548640b1c27a58a8524c3"><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="#ac3381121289548640b1c27a58a8524c3">ciphers::caesar::encrypt</a> (const <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> &amp;text, const int &amp;shift)</td></tr>
<tr class="separator:ac3381121289548640b1c27a58a8524c3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a355e69511cd2006b5c4c80ae95b71056" id="r_a355e69511cd2006b5c4c80ae95b71056"><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="../../d6/d2c/caesar__cipher_8cpp.html#a355e69511cd2006b5c4c80ae95b71056">ciphers::caesar::decrypt</a> (const <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> &amp;text, const int &amp;shift)</td></tr>
<tr class="memitem:a355e69511cd2006b5c4c80ae95b71056" id="r_a355e69511cd2006b5c4c80ae95b71056"><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="#a355e69511cd2006b5c4c80ae95b71056">ciphers::caesar::decrypt</a> (const <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> &amp;text, const int &amp;shift)</td></tr>
<tr class="separator:a355e69511cd2006b5c4c80ae95b71056"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae1a3968e7947464bee7714f6d43b7002" id="r_ae1a3968e7947464bee7714f6d43b7002"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d6/d2c/caesar__cipher_8cpp.html#ae1a3968e7947464bee7714f6d43b7002">test</a> ()</td></tr>
<tr class="memitem:ae1a3968e7947464bee7714f6d43b7002" id="r_ae1a3968e7947464bee7714f6d43b7002"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ae1a3968e7947464bee7714f6d43b7002">test</a> ()</td></tr>
<tr class="separator:ae1a3968e7947464bee7714f6d43b7002"><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="../../d6/d2c/caesar__cipher_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="separator:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
@@ -158,19 +160,12 @@ Algorithm</h3>
<tr>
<td class="memname"><a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> ciphers::caesar::decrypt </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>text</em>, </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>text</em>, </span></td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const int &amp;&#160;</td>
<td class="paramname"><em>shift</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
<td class="paramtype">const int &amp;</td> <td class="paramname"><span class="paramname"><em>shift</em></span>&#160;)</td>
</tr>
</table>
</div><div class="memdoc">
@@ -209,19 +204,12 @@ Algorithm</h3>
<tr>
<td class="memname"><a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> ciphers::caesar::encrypt </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>text</em>, </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>text</em>, </span></td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const int &amp;&#160;</td>
<td class="paramname"><em>shift</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
<td class="paramtype">const int &amp;</td> <td class="paramname"><span class="paramname"><em>shift</em></span>&#160;)</td>
</tr>
</table>
</div><div class="memdoc">
@@ -255,8 +243,7 @@ Algorithm</h3>
<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>
@@ -264,10 +251,10 @@ Algorithm</h3>
<p>Driver Code </p>
<div class="fragment"><div class="line"><span class="lineno"> 120</span> {</div>
<div class="line"><span class="lineno"> 121</span> <span class="comment">// Testing</span></div>
<div class="line"><span class="lineno"> 122</span> <a class="code hl_function" href="../../d6/d2c/caesar__cipher_8cpp.html#ae1a3968e7947464bee7714f6d43b7002">test</a>();</div>
<div class="line"><span class="lineno"> 122</span> <a class="code hl_function" href="#ae1a3968e7947464bee7714f6d43b7002">test</a>();</div>
<div class="line"><span class="lineno"> 123</span> <span class="keywordflow">return</span> 0;</div>
<div class="line"><span class="lineno"> 124</span>}</div>
<div class="ttc" id="acaesar__cipher_8cpp_html_ae1a3968e7947464bee7714f6d43b7002"><div class="ttname"><a href="../../d6/d2c/caesar__cipher_8cpp.html#ae1a3968e7947464bee7714f6d43b7002">test</a></div><div class="ttdeci">void test()</div><div class="ttdef"><b>Definition</b> caesar_cipher.cpp:100</div></div>
<div class="ttc" id="acaesar__cipher_8cpp_html_ae1a3968e7947464bee7714f6d43b7002"><div class="ttname"><a href="#ae1a3968e7947464bee7714f6d43b7002">test</a></div><div class="ttdeci">void test()</div><div class="ttdef"><b>Definition</b> caesar_cipher.cpp:100</div></div>
</div><!-- fragment --><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
@@ -285,7 +272,7 @@ Here is the call graph for this function:</div>
<tr>
<td class="memname">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>
@@ -294,24 +281,24 @@ Here is the call graph for this function:</div>
<div class="fragment"><div class="line"><span class="lineno"> 100</span> {</div>
<div class="line"><span class="lineno"> 101</span> <span class="comment">// Test 1</span></div>
<div class="line"><span class="lineno"> 102</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> text1 = <span class="stringliteral">&quot;ALANTURING&quot;</span>;</div>
<div class="line"><span class="lineno"> 103</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> encrypted1 = <a class="code hl_function" href="../../d6/d2c/caesar__cipher_8cpp.html#ac3381121289548640b1c27a58a8524c3">ciphers::caesar::encrypt</a>(text1, 17);</div>
<div class="line"><span class="lineno"> 104</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> decrypted1 = <a class="code hl_function" href="../../d6/d2c/caesar__cipher_8cpp.html#a355e69511cd2006b5c4c80ae95b71056">ciphers::caesar::decrypt</a>(encrypted1, 17);</div>
<div class="line"><span class="lineno"> 103</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> encrypted1 = <a class="code hl_function" href="#ac3381121289548640b1c27a58a8524c3">ciphers::caesar::encrypt</a>(text1, 17);</div>
<div class="line"><span class="lineno"> 104</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> decrypted1 = <a class="code hl_function" href="#a355e69511cd2006b5c4c80ae95b71056">ciphers::caesar::decrypt</a>(encrypted1, 17);</div>
<div class="line"><span class="lineno"> 105</span> assert(text1 == decrypted1);</div>
<div class="line"><span class="lineno"> 106</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;Original text : &quot;</span> &lt;&lt; text1;</div>
<div class="line"><span class="lineno"> 107</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; , Encrypted text (with shift = 21) : &quot;</span> &lt;&lt; encrypted1;</div>
<div class="line"><span class="lineno"> 108</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; , Decrypted text : &quot;</span>&lt;&lt; decrypted1 &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"> 109</span> <span class="comment">// Test 2</span></div>
<div class="line"><span class="lineno"> 110</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> text2 = <span class="stringliteral">&quot;HELLOWORLD&quot;</span>;</div>
<div class="line"><span class="lineno"> 111</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> encrypted2 = <a class="code hl_function" href="../../d6/d2c/caesar__cipher_8cpp.html#ac3381121289548640b1c27a58a8524c3">ciphers::caesar::encrypt</a>(text2, 1729);</div>
<div class="line"><span class="lineno"> 112</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> decrypted2 = <a class="code hl_function" href="../../d6/d2c/caesar__cipher_8cpp.html#a355e69511cd2006b5c4c80ae95b71056">ciphers::caesar::decrypt</a>(encrypted2, 1729);</div>
<div class="line"><span class="lineno"> 111</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> encrypted2 = <a class="code hl_function" href="#ac3381121289548640b1c27a58a8524c3">ciphers::caesar::encrypt</a>(text2, 1729);</div>
<div class="line"><span class="lineno"> 112</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> decrypted2 = <a class="code hl_function" href="#a355e69511cd2006b5c4c80ae95b71056">ciphers::caesar::decrypt</a>(encrypted2, 1729);</div>
<div class="line"><span class="lineno"> 113</span> assert(text2 == decrypted2);</div>
<div class="line"><span class="lineno"> 114</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;Original text : &quot;</span> &lt;&lt; text2;</div>
<div class="line"><span class="lineno"> 115</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; , Encrypted text (with shift = 1729) : &quot;</span> &lt;&lt; encrypted2;</div>
<div class="line"><span class="lineno"> 116</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; , Decrypted text : &quot;</span>&lt;&lt; decrypted2 &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"> 117</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="acaesar__cipher_8cpp_html_a355e69511cd2006b5c4c80ae95b71056"><div class="ttname"><a href="../../d6/d2c/caesar__cipher_8cpp.html#a355e69511cd2006b5c4c80ae95b71056">ciphers::caesar::decrypt</a></div><div class="ttdeci">std::string decrypt(const std::string &amp;text, const int &amp;shift)</div><div class="ttdef"><b>Definition</b> caesar_cipher.cpp:81</div></div>
<div class="ttc" id="acaesar__cipher_8cpp_html_ac3381121289548640b1c27a58a8524c3"><div class="ttname"><a href="../../d6/d2c/caesar__cipher_8cpp.html#ac3381121289548640b1c27a58a8524c3">ciphers::caesar::encrypt</a></div><div class="ttdeci">std::string encrypt(const std::string &amp;text, const int &amp;shift)</div><div class="ttdef"><b>Definition</b> caesar_cipher.cpp:65</div></div>
<div class="ttc" id="acaesar__cipher_8cpp_html_a355e69511cd2006b5c4c80ae95b71056"><div class="ttname"><a href="#a355e69511cd2006b5c4c80ae95b71056">ciphers::caesar::decrypt</a></div><div class="ttdeci">std::string decrypt(const std::string &amp;text, const int &amp;shift)</div><div class="ttdef"><b>Definition</b> caesar_cipher.cpp:81</div></div>
<div class="ttc" id="acaesar__cipher_8cpp_html_ac3381121289548640b1c27a58a8524c3"><div class="ttname"><a href="#ac3381121289548640b1c27a58a8524c3">ciphers::caesar::encrypt</a></div><div class="ttdeci">std::string encrypt(const std::string &amp;text, const int &amp;shift)</div><div class="ttdef"><b>Definition</b> caesar_cipher.cpp:65</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><!-- fragment --><div class="dynheader">
Here is the call graph for this function:</div>
@@ -327,7 +314,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="../../d6/d2c/caesar__cipher_8cpp.html">caesar_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.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>