MCPcopy Index your code
hub / github.com/smallstep/cli / parseString

Function parseString

internal/sshutil/sshutil.go:123–136  ·  view source on GitHub ↗
(in []byte)

Source from the content-addressed store, hash-verified

121}
122
123func parseString(in []byte) (out, rest []byte, ok bool) {
124 if len(in) < 4 {
125 return
126 }
127 length := binary.BigEndian.Uint32(in)
128 in = in[4:]
129 if cast.Uint32(len(in)) < length {
130 return
131 }
132 out = in[:length]
133 rest = in[length:]
134 ok = true
135 return
136}
137
138// parseDSA parses an DSA key according to RFC 4253, section 6.6.
139func parseDSA(in []byte) (*dsa.PublicKey, error) {

Callers 2

PublicKeyFunction · 0.85
publicKeyTypeAndSizeFunction · 0.85

Calls 1

Uint32Function · 0.92

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…