public static void AesEncrypt(Stream i, Stream o, byte[] key, byte[] iv) { Aes aes = new Aes(key, iv); aes.Encrypt(i, o); }
public static byte[] AesEncrypt(byte[] data, byte[] key) { Aes aes = new Aes(key); return(aes.Encrypt(data)); }
public static byte[] AesDecrypt(byte[] data) { Aes aes = new Aes(CryptoConfig.AES_KEY, CryptoConfig.AES_IV); return(aes.Decrypt(data)); }
public static byte[] AesDecrypt(byte[] data, byte[] key, byte[] iv) { Aes aes = new Aes(key, iv); return(aes.Decrypt(data)); }
public static void AesDecrypt(Stream i, Stream o, byte[] key) { Aes aes = new Aes(key); aes.Decrypt(i, o); }