oicq

package
v0.0.0-...-d9311aa Latest Latest
Warning

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

Go to latest
Published: May 19, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Marshal

func Marshal(d *Data) ([]byte, error)

func Unmarshal

func Unmarshal(p []byte, d *Data) error

Types

type Data

type Data struct {
	Version       uint16               `json:"version,omitempty"`
	ServiceMethod uint16               `json:"service_method,omitempty"`
	Uin           int64                `json:"uin,omitempty"`
	EncryptMethod EncryptMethod        `json:"encrypt_method,omitempty"`
	RandomKey     rpc.Key16Bytes       `json:"random_key,omitempty"`
	KeyVersion    int16                `json:"key_version,omitempty"`
	PublicKey     []byte               `json:"public_key,omitempty"`
	SharedSecret  rpc.Key16Bytes       `json:"shared_secret,omitempty"`
	Type          uint16               `json:"type,omitempty"`
	Code          uint8                `json:"code,omitempty"`
	TLVs          map[uint16]tlv.Codec `json:"tlvs,omitempty"`
}

type EncryptMethod

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

func GetEncryptMethod

func GetEncryptMethod(v uint8) EncryptMethod

Jump to

Keyboard shortcuts

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