/// Encrypts the given [data] with AES using the specified [key]. public static byte[] encryptStringWithAes(String data, KeyParameter key) { AEScoder coder = new AEScoder(key); return(coder.encode(System.Text.Encoding.UTF8.GetBytes(data))); }
/// Encrypts the given [data] with AES using the specified [key]. public static byte[] encryptBytesWithAes(byte[] data, KeyParameter key) { AEScoder coder = new AEScoder(key); return(coder.encode(data)); }