encoding

package
v0.0.0-...-095fe93 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2017 License: AGPL-3.0 Imports: 12 Imported by: 5

Documentation

Index

Constants

View Source
const LibV2RayURLSignature = "libv2ray:?"

Variables

This section is empty.

Functions

This section is empty.

Types

type Encoder

type Encoder struct{}

func (*Encoder) ByteToV2RayURL

func (e *Encoder) ByteToV2RayURL(vu []byte) string

func (*Encoder) EncodeToL2QR

func (e *Encoder) EncodeToL2QR(payload []byte, conf QRGenConf) (*L2QRGen, error)

func (*Encoder) PackV2RayConfigureIntoPackedForm

func (e *Encoder) PackV2RayConfigureIntoPackedForm(FileName string) ([]byte, error)

func (*Encoder) PackV2RayConfigureIntoPackedFormB

func (e *Encoder) PackV2RayConfigureIntoPackedFormB(FileName string, ft []byte) ([]byte, error)

func (*Encoder) StartQRDecode

func (e *Encoder) StartQRDecode() *QRDecoder

func (*Encoder) UnpackV2RayConfB

func (e *Encoder) UnpackV2RayConfB(payload []byte) (string, []byte, error)

func (*Encoder) V2RayURLToByte

func (e *Encoder) V2RayURLToByte(url string) []byte

type L2QRGen

type L2QRGen struct {
	PayloadSegment     int
	ReconstructSegment int
	TotalSegment       int
	// contains filtered or unexported fields
}

func (*L2QRGen) GetSegmentAsByte

func (qg *L2QRGen) GetSegmentAsByte(seg int) ([]byte, error)

type QRDecoder

type QRDecoder struct {
	PieceNeeded   int
	PieceReceived int
	// contains filtered or unexported fields
}

func (*QRDecoder) Finish

func (qd *QRDecoder) Finish() ([]byte, error)

func (*QRDecoder) IsDecodeReady

func (qd *QRDecoder) IsDecodeReady() bool

func (*QRDecoder) OnNewDataScanned

func (qd *QRDecoder) OnNewDataScanned(data []byte) error

Jump to

Keyboard shortcuts

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