public void Compute1024Bytes() { byte[] data = new byte[1024]; using (SHA1Managed sha1 = new SHA1Managed()) using (SHA1Reuse reuse = new SHA1Reuse()) { Assert.IsTrue(reuse.ComputeHash(data).SequenceEqual(sha1.ComputeHash(data))); } using (SHA1Managed sha1 = new SHA1Managed()) using (SHA1Reuse reuse = new SHA1Reuse()) { Assert.IsTrue(reuse.ComputeHash(data).SequenceEqual(sha1.ComputeHash(data))); } }
public void ComputeArray([Values(0, 1, 2, 10, 1024, 325245)]long length) { byte[] data = new byte[length]; using (SHA1Managed sha1 = new SHA1Managed()) using (SHA1Reuse reuse = new SHA1Reuse()) { Assert.IsTrue(reuse.ComputeHash(data).SequenceEqual(sha1.ComputeHash(data))); } using (SHA1Managed sha1 = new SHA1Managed()) using (SHA1Reuse reuse = new SHA1Reuse()) { Assert.IsTrue(reuse.ComputeHash(data).SequenceEqual(sha1.ComputeHash(data))); } }
public void ComputeArray([Values(0, 1, 2, 10, 1024, 325245)] long length) { byte[] data = new byte[length]; using (SHA1Managed sha1 = new SHA1Managed()) using (SHA1Reuse reuse = new SHA1Reuse()) { Assert.IsTrue(reuse.ComputeHash(data).SequenceEqual(sha1.ComputeHash(data))); } using (SHA1Managed sha1 = new SHA1Managed()) using (SHA1Reuse reuse = new SHA1Reuse()) { Assert.IsTrue(reuse.ComputeHash(data).SequenceEqual(sha1.ComputeHash(data))); } }