public void ToFixedBytes(HashType hashType) { var length = HashInfoLookup.Find(hashType).ByteLength; var bytes = Enumerable.Range(0, length).Select(i => (byte)i).ToArray(); var contentHash = new ContentHash(hashType, bytes); var exported = contentHash.ToFixedBytes(); Assert.Equal(new FixedBytes(bytes), exported); }
/// <nodoc/> public Hash(ContentHash hash) { RawHash = new Fingerprint(hash.ToFixedBytes(), hash.Length); }