oicq

package
v0.0.0-...-d85f73f Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2022 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Marshal

func Marshal(ctx context.Context, msg *Message) ([]byte, error)

func Unmarshal

func Unmarshal(ctx context.Context, data []byte, msg *Message) error

Types

type EncryptMethod

type EncryptMethod uint8
var (
	EncryptMethod0x00 EncryptMethod = 0x00
	EncryptMethod0x03 EncryptMethod = 0x03
	EncryptMethodECDH EncryptMethod = 0x07 | 0x80 // 0x07: no password login?
	EncryptMethodST   EncryptMethod = 0x45
	EncryptMethodNULL EncryptMethod = 0xff
)

func GetEncryptMethod

func GetEncryptMethod(v uint8) EncryptMethod

type Message

type Message struct {
	Version       uint16
	ServiceMethod uint16
	Uin           uint64
	EncryptMethod EncryptMethod
	RandomKey     [16]byte
	KeyVersion    uint16
	PublicKey     []byte
	ShareKey      [16]byte
	Type          uint16
	Code          uint8
	TLVs          map[uint16]tlv.TLVCodec
}

Jump to

Keyboard shortcuts

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