diff --git a/Codes/Code-A4.cpp b/Codes/Code-A4.cpp new file mode 100644 index 0000000..c8bb556 --- /dev/null +++ b/Codes/Code-A4.cpp @@ -0,0 +1,102 @@ +#include +#include +using namespace std; + +string XOR(string data, string key) { + // Dividend is data + // Divisor is the primary key, i.e. the key + string result = ""; + int dataLen = data.length(); + int keyLen = key.length(); + + // Perform XOR operation + for (int i=0; i