encode

package
v0.0.0-...-324f145 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxBytesInQRCode = 2953
	MaxPageCount     = math.MaxUint8
)

See https://en.wikipedia.org/wiki/QR_code#Information_capacity

View Source
const FontSize = 12

Variables

This section is empty.

Functions

func GeneratePDF

func GeneratePDF(outputPath string, title string, qrCodes [][]byte) (err error)

func GenerateQRCodes

func GenerateQRCodes(salt []byte, data []byte, maxOutputPages uint) ([][]byte, error)

func ScanAndCombineQRCodes

func ScanAndCombineQRCodes(qrCodes map[string][]byte) (data, salt []byte, err error)

Types

type QRData

type QRData struct {
	Header     *QRHeader `json:"header,omitempty"`
	PageNumber uint8     `json:"page_number"`
	Data       []byte    `json:"data"`
}

type QRHeader

type QRHeader struct {
	Salt      []byte `json:"salt"`
	PageCount uint8  `json:"page_count"`
}

Jump to

Keyboard shortcuts

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