MCPcopy Create free account
hub / github.com/chain/txvm / Sum

Method Sum

crypto/sha3/sha3.go:188–195  ·  view source on GitHub ↗

Sum applies padding to the hash state and then squeezes out the desired number of output bytes.

(in []byte)

Source from the content-addressed store, hash-verified

186// Sum applies padding to the hash state and then squeezes out the desired
187// number of output bytes.
188func (d *state) Sum(in []byte) []byte {
189 // Make a copy of the original hash so that caller can keep writing
190 // and summing.
191 dup := d.clone()
192 hash := make([]byte, dup.outputLen)
193 dup.Read(hash)
194 return append(in, hash...)
195}

Callers

nothing calls this directly

Calls 2

cloneMethod · 0.95
ReadMethod · 0.45

Tested by

no test coverage detected