card

package
v1.0.14 Latest Latest
Warning

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

Go to latest
Published: May 15, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Card

type Card struct {
	// contains filtered or unexported fields
}

func ConnectCard

func ConnectCard(r *reader.Reader) (*Card, error)

ConnectCard verify presence's card on reader and return Card instance.

func (*Card) Atr

func (c *Card) Atr() ([]byte, error)

Atr return ATR bytes of card.

func (*Card) Disconnect

func (c *Card) Disconnect() error

Disconnect release card from reader

func (*Card) GetSessionID added in v1.0.12

func (c *Card) GetSessionID() string

GetSessionID return session id of card

func (*Card) GetUID added in v1.0.12

func (c *Card) GetUID() []byte

GetUID return UID of card

func (*Card) SendAPDU

func (c *Card) SendAPDU(data []byte) ([]byte, error)

SendAPDU send APDU 'data' to card through the reader and wait for a response.

func (*Card) SetSessionID added in v1.0.12

func (c *Card) SetSessionID(sessionId string)

SetSessionID set session id of card

func (*Card) Status

func (c *Card) Status() (StatusCode, error)

Status return status's card on reader

func (*Card) String

func (c *Card) String() string

String print card features

func (*Card) Switch1444_4 added in v1.0.12

func (c *Card) Switch1444_4() ([]byte, error)

Switch1444_4 switch channel reader to send ISO 1444-4 APDU

func (*Card) TransparentSessionEnd added in v1.0.12

func (c *Card) TransparentSessionEnd() ([]byte, error)

TransparentSessionEnd finish transparent session

func (*Card) TransparentSessionResetRF added in v1.0.12

func (c *Card) TransparentSessionResetRF() ([]byte, error)

TransparentSessionResetRF start transparent session to send APDU

func (*Card) TransparentSessionStart added in v1.0.12

func (c *Card) TransparentSessionStart() ([]byte, error)

Transparent Session (PCSC)

func (*Card) TransparentSessionStartOnly added in v1.0.12

func (c *Card) TransparentSessionStartOnly() ([]byte, error)

TransparentSessionStartOnly start transparent session to send APDU

type StatusCode

type StatusCode int
const (
	Ready      StatusCode = 1
	Shared     StatusCode = 2
	NotPresent StatusCode = -1
)

func (StatusCode) String

func (s StatusCode) String() string

String return string with current state's card.

Jump to

Keyboard shortcuts

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