} // end function TransformBytes public override IHashResult TransformFinal() { IHashResult result = ComputeAggregatedBytes(Aggregate()); Initialize(); return(result); } // end function TransformFinal
} // end function Initialize public override IHashResult TransformFinal() { IHashResult result = hash.TransformFinal(); hash.TransformBytes(opad); hash.TransformBytes(result.GetBytes()); result = hash.TransformFinal(); Initialize(); return(result); } // end function TransformFinal
public override unsafe IHashResult TransformFinal() { Int32 i; UInt64 left; byte[][] hash = new byte[ParallelismDegree][]; for (i = 0; i < hash.Length; i++) { hash[i] = new byte[OutSizeInBytes]; } for (i = 0; i < ParallelismDegree; i++) { if (BufferLength > (UInt64)(i * BlockSizeInBytes)) { left = BufferLength - (UInt64)(i * BlockSizeInBytes); if (left > (UInt64)BlockSizeInBytes) { left = (UInt64)BlockSizeInBytes; } LeafHashes[i].TransformBytes(Buffer, i * BlockSizeInBytes, (Int32)left); } hash[i] = LeafHashes[i].TransformFinal().GetBytes(); } for (i = 0; i < ParallelismDegree; i++) { RootHash.TransformBytes(hash[i], 0, OutSizeInBytes); } IHashResult result = RootHash.TransformFinal(); Initialize(); return(result); }
public bool Equals(IHashResult hashResult) => ArrayUtils.ConstantTimeAreEqual(hashResult.GetBytes(), _hash);
public bool CompareTo(IHashResult a_hashResult) { return(SlowEquals(a_hashResult.GetBytes(), hash)); } // end function CompareTo