/// 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))); }
/// Decrypts the given [data] with AES using the specified [key]. public static byte[] decryptWithAes(byte[] data, KeyParameter key) { AEScoder coder = new AEScoder(key); return(coder.decode(data)); }