17 std::cout <<
"<--------------------------------------------------"
26 std::cout <<
"CAESAR CIPHER EXAMPLE\n\n";
28 std::string text0 =
"Plaintext";
30 std::string hashtext_0 = cc.
caesar(text0, shift_key_0);
31 std::cout <<
"Hashtext0 = " << hashtext_0 << std::endl;
33 std::string text1 =
"ATTACKATONCE";
35 std::string hashtext_1 = cc.
caesar(text1, shift_key_1);
36 std::cout <<
"Hashtext1 = " << hashtext_1 << std::endl;
39 std::cout <<
"\nMONOALPHABETIC SUBSTITUION KEYWORD CIPHER EXAMPLE\n\n";
41 std::string shift_key_2 =
"Computer";
42 std::string text2 =
"Password";
46 std::string hashtext_2 = cc.
keyword(text2, encoded_text);
47 std::cout <<
"Hashtext2 = " << hashtext_2 << std::endl;
49 std::string text_4 =
"P455W0RD";
50 std::string key_shift_4 =
"IN1T_d";
53 std::string hashtext_4 = cc.
keyword(text_4, encoded_text_4);
54 std::cout <<
"Hashtext4 = " << hashtext_4 << std::endl;
std::string keyword_encode(std::string key)
std::string keyword(std::string plaintext, std::string encoded_text)
std::string caesar(std::string plaintext, int64_t key)
User API for OpenGPMP NUMBER THEORY MODULE.