Unique String Encoding With Bitwise Operations

Here is a method for encoding a string that I came up with. It is actually a fairly nice method, the strategy behind this and the idea can be added onto, but this works quite well the way it is right now and for how random the output looks when we encode the original string value. const string originalObj = “Let’s have ourselves a Fiesta!!!”; Console.WriteLine(“Original: {0}”, originalObj); Console.WriteLine(“——————-“); // Encoding char* objEncode = stackalloc char[originalObj.Length]; for (int i = 0; i < originalObj.Length; i++) { int j = originalObj[i] ^ i + 1; objEncode[i] = (char)j; } string encodedObj … Continue reading Unique String Encoding With Bitwise Operations