Documentation ¶
Index ¶
- Constants
- Variables
- func BigEndianUvarint(buf []byte) (uint64, int, error)
- func DecryptQuic(header []byte, blockEnd int, destConnId []byte) (plaintext []byte, err error)
- func HkdfExpandLabel(h func() hash.Hash, secret, label []byte, context []byte, length int) ([]byte, error)
- func ReassembleCryptoToBytes(plaintextPayload []byte, reassembledBytes []byte) (b []byte, err error)
- type CryptoFrameOffset
- type CryptoFrameRelocation
- func (r *CryptoFrameRelocation) At(i int) byte
- func (r *CryptoFrameRelocation) BinarySearch(iUpper int, leftOuter, rightOuter int) (iOuter int, iInner int, err error)
- func (r *CryptoFrameRelocation) Bytes() []byte
- func (r *CryptoFrameRelocation) Len() int
- func (r *CryptoFrameRelocation) Range(i, j int) []byte
- type Keys
- 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 ( UnknownFrameTypeError = fmt.Errorf("unknown frame type") OutOfRangeError = fmt.Errorf("index out of range") )
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 ¶
func HkdfExpandLabel ¶
func HkdfExpandLabel(h func() hash.Hash, secret, label []byte, context []byte, length int) ([]byte, error)
HkdfExpandLabel 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 CryptoFrameOffset ¶
func ExtractCryptoFrameOffset ¶
func ExtractCryptoFrameOffset(remainder []byte, transportOffset int) (offset *CryptoFrameOffset, frameSize int, err error)
type CryptoFrameRelocation ¶
type CryptoFrameRelocation struct {
// contains filtered or unexported fields
}
func (*CryptoFrameRelocation) At ¶
func (r *CryptoFrameRelocation) At(i int) byte
func (*CryptoFrameRelocation) BinarySearch ¶
func (*CryptoFrameRelocation) Bytes ¶
func (r *CryptoFrameRelocation) Bytes() []byte
func (*CryptoFrameRelocation) Len ¶
func (r *CryptoFrameRelocation) Len() int
func (*CryptoFrameRelocation) Range ¶
func (r *CryptoFrameRelocation) Range(i, j int) []byte
Range copy bytes from iUpperAppOffset to jUpperAppOffset. It is not suggested to use it for large range and frequent copy.
type Keys ¶
type Keys struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.