private static string Decrypt(byte[] buffer, long size) { byte[] temp = new byte[(int)size]; Array.Copy(buffer, 0, temp, 0, (int)size); //remove \final\, later we add final back string cipherText = Encoding.ASCII.GetString(temp); cipherText = cipherText.Substring(0, cipherText.Length - 7); return(XorEncoding.Encrypt(cipherText, XorEncoding.XorType.Type1) + @"\final\"); }
protected string Decrypt(byte[] buffer, long offset, long size) { byte[] temp = new byte[(int)size]; Array.Copy(buffer, 0, temp, 0, (int)size); //remove final string cipherText = Encoding.ASCII.GetString(temp); cipherText = cipherText.Substring(0, cipherText.Length - 7); return(XorEncoding.Encrypt(cipherText, XorEncoding.XorType.Type1) + @"\final\"); }
protected string Encrypt(string plainText) { return(XorEncoding.Encrypt(plainText, XorEncoding.XorType.Type0)); }
protected string Decrypt(byte[] buffer, long offset, long size) { byte[] cipherText = new byte[(int)size]; Array.Copy(buffer, offset, cipherText, 0, (int)size); return(XorEncoding.Encrypt(cipherText, XorEncoding.XorType.Type0)); }
private static string Encrypt(string plainText) { return(XorEncoding.Encrypt(plainText, XorEncoding.XorType.Type1) + @"\final\"); }
protected string Encrypt(string plainText) { return(XorEncoding.Encrypt(plainText, XorEncoding.XorType.Type1) + @"\final\"); }