For encryption, we consider that the formula is: C = P XOR K, where
* C = encrypted code
* P = plain text
* K = key
For decryption the formula is: P = C XOR K. So, your program will try to find K using this formula. The XOR operator is ^.
1
Expert's answer
2012-12-25T11:57:25-0500
using System; using System.IO;
class Program { public static void Main() { byte C, K, P; Console.Write("Enter C: "); C = byte.Parse(Console.ReadLine()); Console.Write("Enter P: "); P = byte.Parse(Console.ReadLine());
Comments
Leave a comment