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

Method marshal

handshake_messages.go:1659–1669  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1657}
1658
1659func (m *clientKeyExchangeMsg) marshal() ([]byte, error) {
1660 length := len(m.ciphertext)
1661 x := make([]byte, length+4)
1662 x[0] = typeClientKeyExchange
1663 x[1] = uint8(length >> 16)
1664 x[2] = uint8(length >> 8)
1665 x[3] = uint8(length)
1666 copy(x[4:], m.ciphertext)
1667
1668 return x, nil
1669}
1670
1671func (m *clientKeyExchangeMsg) unmarshal(data []byte) bool {
1672 if len(data) < 4 {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected