void Test (string msg, byte[] data, string expected) { byte[] actual = new SHA512_224Managed ().ComputeHash (data); StringBuilder sb = new StringBuilder (); for (int i = 0; i < actual.Length; i ++) sb.Append (actual[i].ToString ("x2")); Assert.AreEqual (expected.ToLower(), sb.ToString(), "ComputeHash #" + msg); }
void Test(string msg, byte[] data, string expected) { byte[] actual = new SHA512_224Managed().ComputeHash(data); StringBuilder sb = new StringBuilder(); for (int i = 0; i < actual.Length; i++) { sb.Append(actual[i].ToString("x2")); } Assert.AreEqual(expected.ToLower(), sb.ToString(), "ComputeHash #" + msg); }
public void PropertyTest () { SHA512_224Managed sha = new SHA512_224Managed (); Assert.AreEqual (224, sha.HashSize); }
public void PropertyTest() { SHA512_224Managed sha = new SHA512_224Managed(); Assert.AreEqual(224, sha.HashSize); }