Documentation ¶
Index ¶
Constants ¶
View Source
const ( V1 uint32 = 0x1 V2 uint32 = 0x6b3343cf )
Variables ¶
This section is empty.
Functions ¶
func ReadCryptoPayload ¶
Types ¶
type Header ¶
type Header struct { Type uint8 Version uint32 SrcConnectionID []byte DestConnectionID []byte Length int64 Token []byte }
The Header represents a QUIC header.
type PacketProtector ¶
type PacketProtector struct {
// contains filtered or unexported fields
}
PacketProtector is used for protecting a QUIC packet.
See: https://www.rfc-editor.org/rfc/rfc9001.html#name-packet-protection
func NewPacketProtector ¶
func NewPacketProtector(key *ProtectionKey) *PacketProtector
NewPacketProtector creates a new PacketProtector.
type ProtectionKey ¶
type ProtectionKey struct {
// contains filtered or unexported fields
}
ProtectionKey is the key used to protect a QUIC packet.
func NewInitialProtectionKey ¶
func NewInitialProtectionKey(secret []byte, v uint32) (*ProtectionKey, error)
NewInitialProtectionKey is like NewProtectionKey, but the returned protection key is used for encrypt/decrypt Initial Packet only.
See: https://datatracker.ietf.org/doc/html/draft-ietf-quic-tls-32#name-initial-secrets
func NewProtectionKey ¶
func NewProtectionKey(suite uint16, secret []byte, v uint32) (*ProtectionKey, error)
NewProtectionKey creates a new ProtectionKey.
Click to show internal directories.
Click to hide internal directories.