public void TestHash() { byte[] input = "TheQuickBrownFox".ToBytes(); string expectedHash = "feb69c5c360a15802de6af23a3f5622da9d96aff2be78c8f188cce57a3549db6"; byte[] hash = Utils.Hash(input, new Sha3Digest()); Assert.AreEqual(expectedHash, hash.ToHexString()); }
public void TestGenerateParameterHash() { List <string> args = new List <string>(); args.Add("a"); args.Add("b"); string hash = Utils.GenerateParameterHash("mypath", "myfunc", args); Assert.AreEqual(Utils.Hash("mypathmyfuncab".ToBytes(), new Sha3Digest()).ToHexString(), hash); }