void Test(int bits, byte[] msg, byte[] expected, string text) { LuffaManaged luffa; switch (bits) { case Luffa224: luffa = new Luffa224Managed(); break; case Luffa256: luffa = new Luffa256Managed(); break; case Luffa384: luffa = new Luffa384Managed(); break; case Luffa512: luffa = new Luffa512Managed(); break; default: throw new ArgumentOutOfRangeException(); } byte[] actual = luffa.ComputeHash(msg); Assert.AreEqual(expected, actual, text); }
void Test (int bits, byte[] msg, byte[] expected, string text) { LuffaManaged luffa; switch (bits) { case Luffa224: luffa = new Luffa224Managed (); break; case Luffa256: luffa = new Luffa256Managed (); break; case Luffa384: luffa = new Luffa384Managed (); break; case Luffa512: luffa = new Luffa512Managed (); break; default: throw new ArgumentOutOfRangeException (); } byte[] actual = luffa.ComputeHash (msg); Assert.AreEqual (expected, actual, text); }