2 // MonoTests.System.Security.Cryptography.Xml.AssertCrypto.cs
5 // Sebastien Pouliot (spouliot@motus.com)
7 // (C) 2002, 2003 Motus Technologies Inc. (http://www.motus.com)
11 using System.Security.Cryptography;
13 using NUnit.Framework;
15 namespace MonoTests.System.Security.Cryptography.Xml {
17 public class AssertCrypto : Assertion {
19 // because most crypto stuff works with byte[] buffers
20 static public void AssertEquals (string msg, byte[] array1, byte[] array2)
22 if ((array1 == null) && (array2 == null))
25 Fail (msg + " -> First array is NULL");
27 Fail (msg + " -> Second array is NULL");
29 bool a = (array1.Length == array2.Length);
31 for (int i = 0; i < array1.Length; i++) {
32 if (array1 [i] != array2 [i]) {
38 msg += " -> Expected " + BitConverter.ToString (array1, 0);
39 msg += " is different than " + BitConverter.ToString (array2, 0);