public static Byte[] Encrypt(Byte[] data, ref Int32 size) { if (data.Length % 8 != 0) { Array.Resize(ref data, ((data.Length >> 3) + 1) * 8); } Array.Resize(ref data, data.Length + 8); AppendChecksum(data); BlowfishCipher.Encrypt(data); return(data); }
public static void Initialize(Byte[] key) { BlowfishCipher.Initialize(key); }
public static Boolean Decrypt(Byte[] data) { BlowfishCipher.Decrypt(data); return(VerifyChecksum(data)); }