mirror of
https://github.com/TheAlgorithms/C-Plus-Plus.git
synced 2026-04-01 01:32:32 +08:00
Documentation for 53a6c16730
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
<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.2"/>
|
||||
<meta name="generator" content="Doxygen 1.9.3"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Algorithms_in_C++: ciphers/vigenere_cipher.cpp File Reference</title>
|
||||
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
|
||||
@@ -30,8 +30,8 @@ MathJax.Hub.Config({
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<tr id="projectrow">
|
||||
<td id="projectalign">
|
||||
<div id="projectname">Algorithms_in_C++<span id="projectnumber"> 1.0.0</span>
|
||||
</div>
|
||||
<div id="projectbrief">Set of algorithms implemented in C++.</div>
|
||||
@@ -41,7 +41,7 @@ MathJax.Hub.Config({
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.2 -->
|
||||
<!-- Generated by Doxygen 1.9.3 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search",'Search','.html');
|
||||
@@ -182,19 +182,19 @@ This program implements Vigenère cipher for only uppercase English alphabet cha
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>new decrypted text </dd></dl>
|
||||
<div class="fragment"><div class="line"><a id="l00092" name="l00092"></a><span class="lineno"> 92</span> {</div>
|
||||
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno"> 93</span> <span class="comment">// Going through each character of text and key</span></div>
|
||||
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno"> 94</span> <span class="comment">// Note that key is visited in circular way hence j = (j + 1) % |key|</span></div>
|
||||
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno"> 95</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> decrypted_text = <span class="stringliteral">""</span>; <span class="comment">// Empty string to store decrypted text</span></div>
|
||||
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno"> 96</span> <span class="keywordflow">for</span>(<span class="keywordtype">size_t</span> i = 0, j = 0; i < text.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string/size.html">length</a>(); i++, j = (j + 1) % key.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string/size.html">length</a>()) {</div>
|
||||
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"> 97</span> <span class="keywordtype">int</span> place_value_text = get_value(text[i]); <span class="comment">// Getting value of character in text</span></div>
|
||||
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno"> 98</span> <span class="keywordtype">int</span> place_value_key = get_value(key[j]); <span class="comment">// Getting value of character in key</span></div>
|
||||
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno"> 99</span> place_value_text = (place_value_text - place_value_key + 26) % 26; <span class="comment">// Applying decryption</span></div>
|
||||
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno"> 100</span> <span class="keywordtype">char</span> decrypted_char = get_char(place_value_text); <span class="comment">// Getting new character from decrypted value</span></div>
|
||||
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno"> 101</span> decrypted_text += decrypted_char; <span class="comment">// Appending decrypted character</span></div>
|
||||
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno"> 102</span> } </div>
|
||||
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno"> 103</span> <span class="keywordflow">return</span> decrypted_text; <span class="comment">// Returning decrypted text</span></div>
|
||||
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno"> 104</span> }</div>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 92</span> {</div>
|
||||
<div class="line"><span class="lineno"> 93</span> <span class="comment">// Going through each character of text and key</span></div>
|
||||
<div class="line"><span class="lineno"> 94</span> <span class="comment">// Note that key is visited in circular way hence j = (j + 1) % |key|</span></div>
|
||||
<div class="line"><span class="lineno"> 95</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> decrypted_text = <span class="stringliteral">""</span>; <span class="comment">// Empty string to store decrypted text</span></div>
|
||||
<div class="line"><span class="lineno"> 96</span> <span class="keywordflow">for</span>(<span class="keywordtype">size_t</span> i = 0, j = 0; i < text.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string/size.html">length</a>(); i++, j = (j + 1) % key.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string/size.html">length</a>()) {</div>
|
||||
<div class="line"><span class="lineno"> 97</span> <span class="keywordtype">int</span> place_value_text = get_value(text[i]); <span class="comment">// Getting value of character in text</span></div>
|
||||
<div class="line"><span class="lineno"> 98</span> <span class="keywordtype">int</span> place_value_key = get_value(key[j]); <span class="comment">// Getting value of character in key</span></div>
|
||||
<div class="line"><span class="lineno"> 99</span> place_value_text = (place_value_text - place_value_key + 26) % 26; <span class="comment">// Applying decryption</span></div>
|
||||
<div class="line"><span class="lineno"> 100</span> <span class="keywordtype">char</span> decrypted_char = get_char(place_value_text); <span class="comment">// Getting new character from decrypted value</span></div>
|
||||
<div class="line"><span class="lineno"> 101</span> decrypted_text += decrypted_char; <span class="comment">// Appending decrypted character</span></div>
|
||||
<div class="line"><span class="lineno"> 102</span> } </div>
|
||||
<div class="line"><span class="lineno"> 103</span> <span class="keywordflow">return</span> decrypted_text; <span class="comment">// Returning decrypted text</span></div>
|
||||
<div class="line"><span class="lineno"> 104</span> }</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="asize_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/string/basic_string/size.html">std::string::length</a></div><div class="ttdeci">T length(T... args)</div></div>
|
||||
</div><!-- fragment --><div class="dynheader">
|
||||
@@ -239,19 +239,19 @@ Here is the call graph for this function:</div>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>new encrypted text </dd></dl>
|
||||
<div class="fragment"><div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span> {</div>
|
||||
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> encrypted_text = <span class="stringliteral">""</span>; <span class="comment">// Empty string to store encrypted text</span></div>
|
||||
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span> <span class="comment">// Going through each character of text and key</span></div>
|
||||
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span> <span class="comment">// Note that key is visited in circular way hence j = (j + 1) % |key|</span></div>
|
||||
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span> <span class="keywordflow">for</span>(<span class="keywordtype">size_t</span> i = 0, j = 0; i < text.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string/size.html">length</a>(); i++, j = (j + 1) % key.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string/size.html">length</a>()) {</div>
|
||||
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span> <span class="keywordtype">int</span> place_value_text = get_value(text[i]); <span class="comment">// Getting value of character in text</span></div>
|
||||
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</span> <span class="keywordtype">int</span> place_value_key = get_value(key[j]); <span class="comment">// Getting value of character in key</span></div>
|
||||
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span> place_value_text = (place_value_text + place_value_key) % 26; <span class="comment">// Applying encryption</span></div>
|
||||
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span> <span class="keywordtype">char</span> encrypted_char = get_char(place_value_text); <span class="comment">// Getting new character from encrypted value</span></div>
|
||||
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"> 82</span> encrypted_text += encrypted_char; <span class="comment">// Appending encrypted character</span></div>
|
||||
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"> 83</span> }</div>
|
||||
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span> <span class="keywordflow">return</span> encrypted_text; <span class="comment">// Returning encrypted text</span></div>
|
||||
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"> 85</span> }</div>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 73</span> {</div>
|
||||
<div class="line"><span class="lineno"> 74</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> encrypted_text = <span class="stringliteral">""</span>; <span class="comment">// Empty string to store encrypted text</span></div>
|
||||
<div class="line"><span class="lineno"> 75</span> <span class="comment">// Going through each character of text and key</span></div>
|
||||
<div class="line"><span class="lineno"> 76</span> <span class="comment">// Note that key is visited in circular way hence j = (j + 1) % |key|</span></div>
|
||||
<div class="line"><span class="lineno"> 77</span> <span class="keywordflow">for</span>(<span class="keywordtype">size_t</span> i = 0, j = 0; i < text.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string/size.html">length</a>(); i++, j = (j + 1) % key.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string/size.html">length</a>()) {</div>
|
||||
<div class="line"><span class="lineno"> 78</span> <span class="keywordtype">int</span> place_value_text = get_value(text[i]); <span class="comment">// Getting value of character in text</span></div>
|
||||
<div class="line"><span class="lineno"> 79</span> <span class="keywordtype">int</span> place_value_key = get_value(key[j]); <span class="comment">// Getting value of character in key</span></div>
|
||||
<div class="line"><span class="lineno"> 80</span> place_value_text = (place_value_text + place_value_key) % 26; <span class="comment">// Applying encryption</span></div>
|
||||
<div class="line"><span class="lineno"> 81</span> <span class="keywordtype">char</span> encrypted_char = get_char(place_value_text); <span class="comment">// Getting new character from encrypted value</span></div>
|
||||
<div class="line"><span class="lineno"> 82</span> encrypted_text += encrypted_char; <span class="comment">// Appending encrypted character</span></div>
|
||||
<div class="line"><span class="lineno"> 83</span> }</div>
|
||||
<div class="line"><span class="lineno"> 84</span> <span class="keywordflow">return</span> encrypted_text; <span class="comment">// Returning encrypted text</span></div>
|
||||
<div class="line"><span class="lineno"> 85</span> }</div>
|
||||
</div><!-- fragment --><div class="dynheader">
|
||||
Here is the call graph for this function:</div>
|
||||
<div class="dyncontent">
|
||||
@@ -277,11 +277,11 @@ Here is the call graph for this function:</div>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >Driver Code </p>
|
||||
<div class="fragment"><div class="line"><a id="l00131" name="l00131"></a><span class="lineno"> 131</span> {</div>
|
||||
<div class="line"><a id="l00132" name="l00132"></a><span class="lineno"> 132</span> <span class="comment">// Testing</span></div>
|
||||
<div class="line"><a id="l00133" name="l00133"></a><span class="lineno"> 133</span> <a class="code hl_function" href="../../dd/d12/vigenere__cipher_8cpp.html#ae1a3968e7947464bee7714f6d43b7002">test</a>();</div>
|
||||
<div class="line"><a id="l00134" name="l00134"></a><span class="lineno"> 134</span> <span class="keywordflow">return</span> 0;</div>
|
||||
<div class="line"><a id="l00135" name="l00135"></a><span class="lineno"> 135</span>}</div>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 131</span> {</div>
|
||||
<div class="line"><span class="lineno"> 132</span> <span class="comment">// Testing</span></div>
|
||||
<div class="line"><span class="lineno"> 133</span> <a class="code hl_function" href="../../dd/d12/vigenere__cipher_8cpp.html#ae1a3968e7947464bee7714f6d43b7002">test</a>();</div>
|
||||
<div class="line"><span class="lineno"> 134</span> <span class="keywordflow">return</span> 0;</div>
|
||||
<div class="line"><span class="lineno"> 135</span>}</div>
|
||||
<div class="ttc" id="avigenere__cipher_8cpp_html_ae1a3968e7947464bee7714f6d43b7002"><div class="ttname"><a href="../../dd/d12/vigenere__cipher_8cpp.html#ae1a3968e7947464bee7714f6d43b7002">test</a></div><div class="ttdeci">void test()</div><div class="ttdef"><b>Definition:</b> vigenere_cipher.cpp:111</div></div>
|
||||
</div><!-- fragment --><div class="dynheader">
|
||||
Here is the call graph for this function:</div>
|
||||
@@ -307,24 +307,24 @@ Here is the call graph for this function:</div>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >Function to test above algorithm </p>
|
||||
<div class="fragment"><div class="line"><a id="l00111" name="l00111"></a><span class="lineno"> 111</span> {</div>
|
||||
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno"> 112</span> <span class="comment">// Test 1</span></div>
|
||||
<div class="line"><a id="l00113" name="l00113"></a><span class="lineno"> 113</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">"NIKOLATESLA"</span>;</div>
|
||||
<div class="line"><a id="l00114" name="l00114"></a><span class="lineno"> 114</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="../../dd/d12/vigenere__cipher_8cpp.html#a6bd3880ea6820c232c1eddf47553c257">ciphers::vigenere::encrypt</a>(text1, <span class="stringliteral">"TESLA"</span>);</div>
|
||||
<div class="line"><a id="l00115" name="l00115"></a><span class="lineno"> 115</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="../../dd/d12/vigenere__cipher_8cpp.html#a3cfc3f9b20a0f230a2fcefd31dc6848e">ciphers::vigenere::decrypt</a>(encrypted1, <span class="stringliteral">"TESLA"</span>);</div>
|
||||
<div class="line"><a id="l00116" name="l00116"></a><span class="lineno"> 116</span> assert(text1 == decrypted1);</div>
|
||||
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno"> 117</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"Original text : "</span> << text1;</div>
|
||||
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno"> 118</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">" , Encrypted text (with key = TESLA) : "</span> << encrypted1;</div>
|
||||
<div class="line"><a id="l00119" name="l00119"></a><span class="lineno"> 119</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">" , Decrypted text : "</span><< decrypted1 << <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"><a id="l00120" name="l00120"></a><span class="lineno"> 120</span> <span class="comment">// Test 2</span></div>
|
||||
<div class="line"><a id="l00121" name="l00121"></a><span class="lineno"> 121</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">"GOOGLEIT"</span>;</div>
|
||||
<div class="line"><a id="l00122" name="l00122"></a><span class="lineno"> 122</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="../../dd/d12/vigenere__cipher_8cpp.html#a6bd3880ea6820c232c1eddf47553c257">ciphers::vigenere::encrypt</a>(text2, <span class="stringliteral">"REALLY"</span>);</div>
|
||||
<div class="line"><a id="l00123" name="l00123"></a><span class="lineno"> 123</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="../../dd/d12/vigenere__cipher_8cpp.html#a3cfc3f9b20a0f230a2fcefd31dc6848e">ciphers::vigenere::decrypt</a>(encrypted2, <span class="stringliteral">"REALLY"</span>);</div>
|
||||
<div class="line"><a id="l00124" name="l00124"></a><span class="lineno"> 124</span> assert(text2 == decrypted2);</div>
|
||||
<div class="line"><a id="l00125" name="l00125"></a><span class="lineno"> 125</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"Original text : "</span> << text2;</div>
|
||||
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno"> 126</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">" , Encrypted text (with key = REALLY) : "</span> << encrypted2;</div>
|
||||
<div class="line"><a id="l00127" name="l00127"></a><span class="lineno"> 127</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">" , Decrypted text : "</span><< decrypted2 << <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"><a id="l00128" name="l00128"></a><span class="lineno"> 128</span>}</div>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 111</span> {</div>
|
||||
<div class="line"><span class="lineno"> 112</span> <span class="comment">// Test 1</span></div>
|
||||
<div class="line"><span class="lineno"> 113</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">"NIKOLATESLA"</span>;</div>
|
||||
<div class="line"><span class="lineno"> 114</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="../../dd/d12/vigenere__cipher_8cpp.html#a6bd3880ea6820c232c1eddf47553c257">ciphers::vigenere::encrypt</a>(text1, <span class="stringliteral">"TESLA"</span>);</div>
|
||||
<div class="line"><span class="lineno"> 115</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="../../dd/d12/vigenere__cipher_8cpp.html#a3cfc3f9b20a0f230a2fcefd31dc6848e">ciphers::vigenere::decrypt</a>(encrypted1, <span class="stringliteral">"TESLA"</span>);</div>
|
||||
<div class="line"><span class="lineno"> 116</span> assert(text1 == decrypted1);</div>
|
||||
<div class="line"><span class="lineno"> 117</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"Original text : "</span> << text1;</div>
|
||||
<div class="line"><span class="lineno"> 118</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">" , Encrypted text (with key = TESLA) : "</span> << encrypted1;</div>
|
||||
<div class="line"><span class="lineno"> 119</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">" , Decrypted text : "</span><< decrypted1 << <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"> 120</span> <span class="comment">// Test 2</span></div>
|
||||
<div class="line"><span class="lineno"> 121</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">"GOOGLEIT"</span>;</div>
|
||||
<div class="line"><span class="lineno"> 122</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="../../dd/d12/vigenere__cipher_8cpp.html#a6bd3880ea6820c232c1eddf47553c257">ciphers::vigenere::encrypt</a>(text2, <span class="stringliteral">"REALLY"</span>);</div>
|
||||
<div class="line"><span class="lineno"> 123</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="../../dd/d12/vigenere__cipher_8cpp.html#a3cfc3f9b20a0f230a2fcefd31dc6848e">ciphers::vigenere::decrypt</a>(encrypted2, <span class="stringliteral">"REALLY"</span>);</div>
|
||||
<div class="line"><span class="lineno"> 124</span> assert(text2 == decrypted2);</div>
|
||||
<div class="line"><span class="lineno"> 125</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"Original text : "</span> << text2;</div>
|
||||
<div class="line"><span class="lineno"> 126</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">" , Encrypted text (with key = REALLY) : "</span> << encrypted2;</div>
|
||||
<div class="line"><span class="lineno"> 127</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">" , Decrypted text : "</span><< decrypted2 << <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"> 128</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="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="avigenere__cipher_8cpp_html_a3cfc3f9b20a0f230a2fcefd31dc6848e"><div class="ttname"><a href="../../dd/d12/vigenere__cipher_8cpp.html#a3cfc3f9b20a0f230a2fcefd31dc6848e">ciphers::vigenere::decrypt</a></div><div class="ttdeci">std::string decrypt(const std::string &text, const std::string &key)</div><div class="ttdef"><b>Definition:</b> vigenere_cipher.cpp:92</div></div>
|
||||
@@ -344,7 +344,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="../../dd/d12/vigenere__cipher_8cpp.html">vigenere_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.2 </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.3 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
Reference in New Issue
Block a user