MCPcopy
hub / github.com/golang/crypto / parseString

Function parseString

ssh/messages.go:607–620  ·  view source on GitHub ↗
(in []byte)

Source from the content-addressed store, hash-verified

605var bigOne = big.NewInt(1)
606
607func parseString(in []byte) (out, rest []byte, ok bool) {
608 if len(in) < 4 {
609 return
610 }
611 length := binary.BigEndian.Uint32(in)
612 in = in[4:]
613 if uint32(len(in)) < length {
614 return
615 }
616 out = in[:length]
617 rest = in[length:]
618 ok = true
619 return
620}
621
622var (
623 comma = []byte{','}

Callers 15

serverAuthenticateMethod · 0.85
ChallengeMethod · 0.85
ParsePublicKeyFunction · 0.85
UnmarshalFunction · 0.85
parseNameListFunction · 0.85
parseIntFunction · 0.85
parseTuplesFunction · 0.85
parseCertFunction · 0.85
MarshalMethod · 0.85
parseSignatureBodyFunction · 0.85
parseSignatureFunction · 0.85

Calls

no outgoing calls

Tested by 1

Used in the wild real call sites across dependent graphs

searching dependent graphs…