daily pastebin goal
73%
SHARE
TWEET

Untitled

a guest Jan 24th, 2019 57 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. int main()
  2. {
  3.     std::string str = "ATTACKATDAWN";
  4.     std::string key = "LEMONLEMONLE";
  5.  
  6.     std::string result;
  7.  
  8.     int keyIndex = 0;
  9.  
  10.     char s_buffer[100];
  11.     int i = 0;
  12.     for (i = 0; i < str.length(); i++)
  13.     {
  14.         char chiphed = Vigenere(str[i], key[i]);
  15.         (keyIndex == key.length() - 1) ? keyIndex = 0 : keyIndex++;
  16.         s_buffer[i] = chiphed;
  17.     }
  18.  
  19.     s_buffer[i] = 0;
  20.  
  21.     std::cout << s_buffer << std::endl;
  22. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top