private ContentHash ComputeStartedCopyHash(ContentHash hash) { var murmurHash = MurmurHash3.Create(hash.ToByteArray(), _startedCopyHashSeed); var hashLength = HashInfoLookup.Find(_hashType).ByteLength; var buffer = murmurHash.ToByteArray(); Array.Resize(ref buffer, hashLength); return new ContentHash(_hashType, buffer); }
private static (WeakContentFingerprint wf, StrongContentFingerprint sf) GetBuildManifestHashKey(ContentHash hash) { var hashBytes = hash.ToByteArray(); Array.Resize(ref hashBytes, FingerprintUtilities.FingerprintLength); var wf = new WeakContentFingerprint(FingerprintUtilities.CreateFrom(hashBytes)); var sf = new StrongContentFingerprint(wf.Hash); return(wf, sf); }