public override void PerformTest()
{
BufferedBlockCipher cipher = new BufferedBlockCipher(engine);
cipher.Init(true, param);
byte[] outBytes = new byte[input.Length];
int len1 = cipher.ProcessBytes(input, 0, input.Length, outBytes, 0);
cipher.DoFinal(outBytes, len1);
if (!AreEqual(outBytes, output))
{
Fail("failed - " + "expected " + Hex.ToHexString(output) + " got " + Hex.ToHexString(outBytes));
}
cipher.Init(false, param);
int len2 = cipher.ProcessBytes(output, 0, output.Length, outBytes, 0);
cipher.DoFinal(outBytes, len2);
if (!AreEqual(input, outBytes))
{
Fail("failed reversal got " + Hex.ToHexString(outBytes));
}
}