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

Method marshal

ticket.go:89–100  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

87}
88
89func (m *sessionStateTLS13) marshal() []byte {
90 var b cryptobyte.Builder
91 b.AddUint16(VersionTLS13)
92 b.AddUint8(0) // revision
93 b.AddUint16(m.cipherSuite)
94 addUint64(&b, m.createdAt)
95 b.AddUint8LengthPrefixed(func(b *cryptobyte.Builder) {
96 b.AddBytes(m.resumptionSecret)
97 })
98 marshalCertificate(&b, m.certificate)
99 return b.BytesOrPanic()
100}
101
102func (m *sessionStateTLS13) unmarshal(data []byte) bool {
103 *m = sessionStateTLS13{}

Callers 1

sendSessionTicketsMethod · 0.95

Calls 2

addUint64Function · 0.85
marshalCertificateFunction · 0.85

Tested by

no test coverage detected