func (rv *rollingValueHasher) writeHash(h hash.Hash) { digest := h.Digest() for _, b := range digest[:] { rv.HashByte(b) } }
func serializeHash(w io.Writer, h hash.Hash) { digest := h.Digest() n, err := io.Copy(w, bytes.NewReader(digest[:])) d.Chk.NoError(err) d.Chk.True(int64(hash.ByteLen) == n) }
func (b *binaryNomsWriter) writeHash(h hash.Hash) { b.ensureCapacity(sha1.Size) digest := h.Digest() copy(b.buff[b.offset:], digest[:]) b.offset += sha1.Size }
func (b *binaryNomsWriter) writeHash(h hash.Hash) { b.ensureCapacity(hash.ByteLen) digest := h.Digest() copy(b.buff[b.offset:], digest[:]) b.offset += hash.ByteLen }