public static void Main()
Console.WriteLine(DecryptString("aasdfasfa"));
System.IO.MemoryStream msIn =
new System.IO.MemoryStream(bytesI
System.Security.Cryptography.ICryptoTransform desdecrypt =
System.Security.Cryptography.CryptoStream cryptStreem =
new System.Security.Cryptography.CryptoStream(msIn,
System.Security.Cryptography.CryptoStreamMode.Read);
System.IO.StreamReader srOut =
new System.IO.StreamReader(cryptStreem,
System.Text.Encoding.UTF8);
string result = srOut.ReadToEnd();
private static byte[] ResizeBytesArray ( byte[] bytes, int newSize )
byte[] newLine = new byte[newSize];
if (bytes.Length<=newSize)
for (int i=0; i<bytes.Length; i++)
for (int i=0; i<bytes.Length; i++)
newLine[pos++] ^= bytes[i];
pos = (pos>=newLine.Length)?0:pos;