private byte[] EncryptRX(byte[] Key, byte[] Data) { int blocks = Data.Length / 16; byte[] outputData = new byte[Data.Length]; RDX transform = new RDX(); transform.Init(true, Key); for (int i = 0; i < blocks; i++) { transform.EncryptBlock(Data, i * 16, outputData, i * 16); } return(outputData); }
private byte[] DecryptRX(byte[] Key, byte[] Data) { int blocks = Data.Length / 16; byte[] outputData = new byte[Data.Length]; RDX transform = new RDX(); transform.Init(false, Key); for (int i = 0; i < blocks; i++) transform.DecryptBlock(Data, i * 16, outputData, i * 16); return outputData; }