oicq

package
v0.0.0-...-17dadc4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 23, 2023 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUnknownFlag        = errors.New("unknown flag")
	ErrUnknownEncryptType = errors.New("unknown encrypt type")
)

Functions

This section is empty.

Types

type Codec

type Codec struct {
	WtSessionTicketKey []byte
	// contains filtered or unexported fields
}

func NewCodec

func NewCodec(uin int64) *Codec

func (*Codec) Marshal

func (c *Codec) Marshal(m *Message) []byte

func (*Codec) Unmarshal

func (c *Codec) Unmarshal(data []byte) (*Message, error)

type EncryptionMethod

type EncryptionMethod byte
const (
	EM_ECDH EncryptionMethod = iota
	EM_ST
)

type Message

type Message struct {
	Uin              uint32
	Command          uint16
	EncryptionMethod EncryptionMethod
	Body             []byte
}

type TLV

type TLV struct {
	Command uint16
	List    [][]byte
}

func (*TLV) Append

func (t *TLV) Append(b ...[]byte)

func (*TLV) Marshal

func (t *TLV) Marshal() []byte

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL