MCPcopy Create free account
hub / github.com/XTLS/Go / readUint64

Function readUint64

handshake_messages.go:42–49  ·  view source on GitHub ↗

readUint64 decodes a big-endian, 64-bit value into out and advances over it. It reports whether the read was successful.

(s *cryptobyte.String, out *uint64)

Source from the content-addressed store, hash-verified

40// readUint64 decodes a big-endian, 64-bit value into out and advances over it.
41// It reports whether the read was successful.
42func readUint64(s *cryptobyte.String, out *uint64) bool {
43 var hi, lo uint32
44 if !s.ReadUint32(&hi) || !s.ReadUint32(&lo) {
45 return false
46 }
47 *out = uint64(hi)<<32 | uint64(lo)
48 return true
49}
50
51// readUint8LengthPrefixed acts like s.ReadUint8LengthPrefixed, but targets a
52// []byte instead of a cryptobyte.String.

Callers 2

unmarshalMethod · 0.85
unmarshalMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…