public void HashTest() { HashNode node = new HashNode(); node.Hash = TestVectors.h("ABCDEF"); CustomAssert.AreEqual(TestVectors.h("ABCDEF"), node.Hash); }
public void Constructor3Test() { HashNode node = new HashNode(TestVectors.h("ABCDEF"), 1, 2); CustomAssert.AreEqual(TestVectors.h("ABCDEF"), node.Hash); Assert.AreEqual(1, node.RangeStart); Assert.AreEqual(2, node.RangeEnd); }
public void RootTest() { HashTree tree = new HashTree(new Tiger(TigerParameters.GetParameters(TigerStandard.Tiger192BitVersion1)), 1024); byte[] topHash = tree.ComputeHash(TestVectors.Battery.MillionAs); CustomAssert.AreEqual(TestVectors.h("511F341A7C14145FCBA4A55A9CCAF743DAC0EEF270010973"), tree.Root.Hash); Assert.AreEqual(0, tree.Root.RangeStart); Assert.AreEqual(999999, tree.Root.RangeEnd); }
public void Constructor5Test() { HashTreeNode node = new HashTreeNode(TestVectors.h("ABCDEF"), 1, 2); CustomAssert.AreEqual(TestVectors.h("ABCDEF"), node.Hash); Assert.IsNull(node.Parent); Assert.IsNull(node.Left); Assert.IsNull(node.Right); Assert.AreEqual(1, node.RangeStart); Assert.AreEqual(2, node.RangeEnd); }