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

Function encodeString

crypto/sha3/cshake.go:77–81  ·  view source on GitHub ↗
(d *state, s []byte)

Source from the content-addressed store, hash-verified

75}
76
77func encodeString(d *state, s []byte) int {
78 n := leftEncode(d, uint64(len(s)*8))
79 w, _ := d.Write(s)
80 return n + w
81}
82
83// rightEncode encodes integer in a variable-length encoding
84// unambiguously parseable from the end of a string.

Callers 5

newKMACFunction · 0.85
BenchmarkEncodeStringFunction · 0.85
WriteItemMethod · 0.85
newTupleHashFunction · 0.85
initCShakeMethod · 0.85

Calls 2

leftEncodeFunction · 0.85
WriteMethod · 0.45

Tested by 1

BenchmarkEncodeStringFunction · 0.68