utimaco

package
v0.16.1 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2025 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Info         = 1
	InfoGood     = 2
	Error        = 3
	ErrorWarning = 4
	ErrorBad     = 5
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Command

type Command struct {
	Key     string
	Command string
	Resp    string
	Channel chan string
}

type Utimaco

type Utimaco struct {
	Socket        net.Conn
	RequestPool   sync.Map
	QueueMutex    *sync.Mutex
	SendQueue     chan Command
	EnableLogging bool         `json:"log"`
	SendStan      bool         `json:"sendStan"`
	Stan          atomic.Int64 `json:"stan"`
	Pvk           string       `json:"pvk"`
	Cvk           string       `json:"cvk"`
	Tpk           string       `json:"tpk"`
	IsSenderUp    bool
}

func Init

func Init(ip, port, pvk, cvk, tpk string) (*Utimaco, error)

func (*Utimaco) Crypt

func (config *Utimaco) Crypt(data, mode string) (string, error)

func (*Utimaco) Cvv

func (config *Utimaco) Cvv(pan, exp, cvvType string) (string, error)

func (*Utimaco) GetKey

func (config *Utimaco) GetKey(id string) string

func (*Utimaco) InitSenderThread

func (config *Utimaco) InitSenderThread()

func (*Utimaco) Mac

func (config *Utimaco) Mac(data string) (string, error)

func (*Utimaco) Offset

func (config *Utimaco) Offset(pan, pinBlock string) (string, error)

func (*Utimaco) PurgeRequestsUntilReconnection

func (config *Utimaco) PurgeRequestsUntilReconnection()

func (*Utimaco) Pvv

func (config *Utimaco) Pvv(pan, pinBlock string) (string, error)

func (*Utimaco) Reconnect

func (config *Utimaco) Reconnect()

func (*Utimaco) SendCommand

func (config *Utimaco) SendCommand(stan, command string) string

func (*Utimaco) SetKey

func (config *Utimaco) SetKey(id, value string)

func (*Utimaco) Translate

func (config *Utimaco) Translate(pan, pinBlock, tpk2nd string) (string, error)

func (*Utimaco) WaitForMessage

func (config *Utimaco) WaitForMessage()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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