// // System.Security.Cryptography.Test SHA1 NUnit test classes. // // Author: // Matthew S. Ford (Matthew.S.Ford@Rose-Hulman.Edu) // // Copyright 2001 by Matthew S. Ford. // using NUnit.Framework; using System; using System.Security.Cryptography; using System.Text; namespace System.Security.Cryptography.Test { public class SHA1HashingTest : TestCase { byte[] _dataToHash; byte[] _expectedHash; public SHA1HashingTest (string name, byte[] dataToHash, byte[] expectedHash) : base(name) { _dataToHash = dataToHash; _expectedHash = expectedHash; } public static bool ArrayEquals (byte[] arr1, byte[] arr2) { int i; if (arr1.GetLength(0) != arr2.GetLength(0)) return false; for (i=0; i