utils

package
v0.0.0-...-7028a79 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrPacketSizeIsBigger = errors.New("packet size is more than 127 bytes, require 4 bytes value")
)

Functions

func AuthKeyHash

func AuthKeyHash(key []byte) []byte

func FullStack

func FullStack()

func GenerateMessageId

func GenerateMessageId() int64

GenerateMessageId отдает по сути unix timestamp но ужасно специфическим образом TODO: нахуя нужно битовое и на -4??

func GenerateSessionID

func GenerateSessionID() int64

func GetPacketLengthMTProtoCompatible

func GetPacketLengthMTProtoCompatible(bytesToGetInfo []byte) (int, error)

исходя из переданного числа в bytestoGetInfo считает количество СЛОВ и отдает количество БАЙТ которые нужно прочитать

func PacketLengthMTProtoCompatible

func PacketLengthMTProtoCompatible(data []byte) []byte

Types

This section is empty.

Jump to

Keyboard shortcuts

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