shared

package
v0.0.0-...-e0c9040 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxBase            = 999
	MaxActivationValue = 995
	PaygDisableValue   = 998
	CounterSyncValue   = 999
	TokenValueOffset   = 1000
)
View Source
const (
	TokenTypeAddTime     TokenType = 1
	TokenTypeSetTime               = 2
	TokenTypeDisablePayg           = 3
	TokenTypeCounterSync           = 4
	TokenTypeInvalid               = 10
	TokenTypeAlreadyUsed           = 11
)

Variables

This section is empty.

Functions

func ConvertTo4DigitsToken

func ConvertTo4DigitsToken(source uint64, nbOfDigits int) string

func GenerateNextToken

func GenerateNextToken(lastCode uint32, key []byte) uint32

func GenerateStartingCode

func GenerateStartingCode(key []byte) uint32

func GetTokenBase

func GetTokenBase(code uint64) uint64

func PutBaseInToken

func PutBaseInToken(token, tokenbase uint64) (uint64, error)

Types

type TokenType

type TokenType uint8

Jump to

Keyboard shortcuts

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