MCPcopy
hub / github.com/XTLS/REALITY / marshal

Method marshal

handshake_messages.go:1844–1857  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1842}
1843
1844func (m *certificateVerifyMsg) marshal() ([]byte, error) {
1845 var b cryptobyte.Builder
1846 b.AddUint8(typeCertificateVerify)
1847 b.AddUint24LengthPrefixed(func(b *cryptobyte.Builder) {
1848 if m.hasSignatureAlgorithm {
1849 b.AddUint16(uint16(m.signatureAlgorithm))
1850 }
1851 b.AddUint16LengthPrefixed(func(b *cryptobyte.Builder) {
1852 b.AddBytes(m.signature)
1853 })
1854 })
1855
1856 return b.Bytes()
1857}
1858
1859func (m *certificateVerifyMsg) unmarshal(data []byte) bool {
1860 s := cryptobyte.String(data)

Callers

nothing calls this directly

Calls 1

BytesMethod · 0.80

Tested by

no test coverage detected