public static bool VerifyLeaves(byte[] correctHash, byte[][] hashBlock) //compresses hash blocks to hash. { if (hashBlock.Length == 0) { return(false); } return(ThexHelper.HashesEquals(correctHash, ThexHelper.CompressHashBlock(_hashCalculator.Hasher, hashBlock))); }
public static bool VerifySegment(byte[] correctHash, string filePath, long start, int length) { return(ThexHelper.VerifySegment(_hashCalculator.Hasher, correctHash, filePath, start, length)); }
private void ProcessInternalLeaf(int level, int index, byte[] leafA, byte[] leafB) { var tg = new T(); TTH[level][index] = ThexHelper.InternalHash(tg, leafA, leafB); }