MCPcopy Create free account
hub / github.com/SmartPool/smartpool-client / msbPadding

Function msbPadding

mtree/util.go:22–29  ·  view source on GitHub ↗
(a []byte, size uint32)

Source from the content-addressed store, hash-verified

20}
21
22func msbPadding(a []byte, size uint32) []byte {
23 result := make([]byte, len(a))
24 copy(result, a)
25 for i := uint32(len(a)); i < size; i++ {
26 result = append([]byte{0}, result...)
27 }
28 return result
29}

Callers 2

CounterBytesMethod · 0.85
HashBranchArrayMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected