Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "stdafx.h"
- #include <cstdlib>
- #include <iostream>
- #include <fstream>
- #include <string>
- using namespace std;
- string buf = "";
- void XOR(string patch, string key){
- key = new string [10000];
- ifstream plik(patch);
- string ch;
- int i=0;
- while (!plik.eof()){
- buf[i]=ch^(key[i%key.length()]);
- i++;
- }
- plik.close();
- }
- void zapisz(char patch[]){
- ofstream zapis(patch);
- zapis << buf ;
- zapis.close();
- }
- int main(int argc, char *argv[])
- {
- XOR("wyjscie.txt","XYZTO7");
- zapisz("wyjscie2.txt");
- system("PAUSE");
- return EXIT_SUCCESS;
- }
Add Comment
Please, Sign In to add comment