public unsafe bool Equals(StrongSum other) { if (alg != other.alg) { return(false); } if (sum == null) { return(other.sum == null); } if (sum.Length != other.sum.Length) { return(false); fixed(byte *t = sum) fixed(byte *o = other.sum) { Debug.Assert(sum.Length == other.sum.Length); for (var i = 0; i < sum.Length; i++) { if (t[i] != o[i]) { return(false); } } } return(true); }
void ISignatureProcessor.Chunk(uint weak, StrongSum strong) { var blockSign = new BlockSign(weak, strong) { Start = position, Length = chunkSize }; blocks.Add(blockSign); position += chunkSize; }
public BlockSign LookupBlock(uint weak, StrongSum strong) { BlockSign block; if (blocks.TryGetValue(strong, out block)) { return(block); } else { return(null); } }