Guest User

Untitled

a guest
Jan 17th, 2019
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. #include "stdafx.h"
  2. #include <cstdlib>
  3. #include <iostream>
  4. #include <fstream>
  5. #include <string>
  6.  
  7. using namespace std;
  8. string buf = "";
  9.  
  10.  
  11. void XOR(string patch, string key){
  12. key = new string [10000];
  13.  
  14. ifstream plik(patch);
  15. string ch;
  16. int i=0;
  17. while (!plik.eof()){
  18. buf[i]=ch^(key[i%key.length()]);
  19. i++;
  20. }
  21.  
  22.  
  23. plik.close();
  24. }
  25.  
  26. void zapisz(char patch[]){
  27.  
  28. ofstream zapis(patch);
  29. zapis << buf ;
  30. zapis.close();
  31. }
  32.  
  33. int main(int argc, char *argv[])
  34. {
  35. XOR("wyjscie.txt","XYZTO7");
  36. zapisz("wyjscie2.txt");
  37. system("PAUSE");
  38. return EXIT_SUCCESS;
  39. }
Add Comment
Please, Sign In to add comment