Documentation ¶
Index ¶
- Constants
- Variables
- func BigEndianUvarint(buf []byte) (uint64, int, error)
- func DecryptQuic_(header []byte, blockEnd int, destConnId []byte) (plaintext []byte, err error)
- func HkdfExpandLabelFromPool(h func() hash.Hash, secret, label []byte, context []byte, length int) ([]byte, error)
- type BuiltinBytesLocator
- type CryptoFrameOffset
- type Keys
- type LinearLocator
- type Locator
- type Version
Constants ¶
View Source
const ( MaxVarintLen64 = 8 MaxPacketNumberLength = 4 SampleSize = 16 )
View Source
const ( Quic_FrameType_Padding = 0 Quic_FrameType_Ping = 1 Quic_FrameType_Crypto = 6 Quic_FrameType_ConnectionClose = 0x1c Quic_FrameType_ConnectionClose2 = 0x1d )
View Source
const ( Version_Draft = iota Version_V1 Version_V2 )
Variables ¶
View Source
var ( ErrUnknownFrameType = fmt.Errorf("unknown frame type") ErrOutOfRange = fmt.Errorf("index out of range") )
View Source
var (
ErrMissingCrypto = fmt.Errorf("missing crypto frame")
)
View Source
var (
InitialClientLabel = []byte("client in")
)
Functions ¶
func BigEndianUvarint ¶
BigEndianUvarint decodes a uint64 from buf and returns that value and the number of bytes read (> 0).
func DecryptQuic_ ¶ added in v0.4.0
func HkdfExpandLabelFromPool ¶
func HkdfExpandLabelFromPool(h func() hash.Hash, secret, label []byte, context []byte, length int) ([]byte, error)
HkdfExpandLabelFromPool HKDF expands a label. Since this implementation avoids using a cryptobyte.Builder, it is about 15% faster than the hkdfExpandLabel in the standard library.
Types ¶
type BuiltinBytesLocator ¶
type BuiltinBytesLocator []byte
func (BuiltinBytesLocator) Bytes ¶ added in v0.4.0
func (l BuiltinBytesLocator) Bytes() ([]byte, error)
func (BuiltinBytesLocator) Len ¶
func (l BuiltinBytesLocator) Len() int
type CryptoFrameOffset ¶
func ExtractCryptoFrameOffset ¶
func ExtractCryptoFrameOffset(remainder []byte, transportOffset int) (offset *CryptoFrameOffset, frameSize int, err error)
func ReassembleCryptos ¶ added in v0.4.0
func ReassembleCryptos(offsets []*CryptoFrameOffset, newPayload []byte) (newOffsets []*CryptoFrameOffset, err error)
type Keys ¶
type Keys struct {
// contains filtered or unexported fields
}
type LinearLocator ¶
type LinearLocator struct {
// contains filtered or unexported fields
}
LinearLocator only searches forward and have no boundary check.
func NewLinearLocator ¶
func NewLinearLocator(o []*CryptoFrameOffset) *LinearLocator
func (*LinearLocator) Bytes ¶ added in v0.4.0
func (l *LinearLocator) Bytes() ([]byte, error)
func (*LinearLocator) Len ¶
func (l *LinearLocator) Len() int
Click to show internal directories.
Click to hide internal directories.