MCPcopy Index your code
hub / github.com/CovenantSQL/CovenantSQL / CloneBytes

Method CloneBytes

crypto/hash/hash.go:75–80  ·  view source on GitHub ↗

CloneBytes returns a copy of the bytes which represent the hash as a byte slice. NOTE: It is generally cheaper to just slice the hash directly thereby reusing the same bytes rather than calling this method.

()

Source from the content-addressed store, hash-verified

73// NOTE: It is generally cheaper to just slice the hash directly thereby reusing
74// the same bytes rather than calling this method.
75func (h *Hash) CloneBytes() []byte {
76 newHash := make([]byte, HashSize)
77 copy(newHash, h[:])
78
79 return newHash
80}
81
82// MarshalHash marshals for hash.
83func (h *Hash) MarshalHash() (o []byte, err error) {

Callers 13

MarshalHashMethod · 0.95
TestMergeTwoHashFunction · 0.80
TestLocalKeyStoreFunction · 0.80
TestHashFunction · 0.80
TestTHashHFunction · 0.80
TestMultiChainFunction · 0.80
setupMuxParallelFunction · 0.80
initNodePeersFunction · 0.80
InitKMSFunction · 0.80
TestETLSBugFunction · 0.80

Calls

no outgoing calls

Tested by 10

TestMergeTwoHashFunction · 0.64
TestLocalKeyStoreFunction · 0.64
TestHashFunction · 0.64
TestTHashHFunction · 0.64
TestMultiChainFunction · 0.64
setupMuxParallelFunction · 0.64
TestETLSBugFunction · 0.64
TestEncPingFindNeighborFunction · 0.64