Here is the crypt.cpp file and the assignment says I need to write an encryption function, crypt with ths algorithm:
The cryptographic key K is a 16-bit integer (unsigned short)
and encrption E is:
E(M) = M XOR (K||K||...) where key K is repeated n/2 times,
M is message and n is message length
This is what I have for crypt function, is it correct?
Here is the crypt.cpp that has the crypt function that I needed to write, the header was defined already, just the body of function I needed to write:
============================================================================