Documentation
¶
Overview ¶
* package to handle the communication of smartcard devices under the PCSC implementation
projects on which it is based:
https://github.com/LudovicRousseau/PCSC https://github.com/ebfe/scard
/*
Index ¶
- func ListReaders(ctx *Context) ([]string, error)
- type Card
- type Context
- type Reader
- type Scard
- func (c *Scard) ATR() ([]byte, error)
- func (c *Scard) ATS() ([]byte, error)
- func (c *Scard) Apdu(apdu []byte) ([]byte, error)
- func (c *Scard) ControlApdu(ioctl uint32, apdu []byte) ([]byte, error)
- func (c *Scard) ControlApduA(ioctl uint32, apdu []byte) ([]byte, error)
- func (c *Scard) DisconnectCard() error
- func (c *Scard) DisconnectEjectCard() error
- func (c *Scard) DisconnectResetCard() error
- func (c *Scard) DisconnectUnpowerCard() error
- func (c *Scard) EndTransaction() error
- func (c *Scard) EndTransactionResetCard() error
- func (c *Scard) GetData(ins byte) ([]byte, error)
- func (c *Scard) SAK() byte
- func (c *Scard) Switch1444_3() ([]byte, error)
- func (c *Scard) Switch1444_4() ([]byte, error)
- func (c *Scard) TransparentSessionEnd() ([]byte, error)
- func (c *Scard) TransparentSessionResetRF() ([]byte, error)
- func (c *Scard) TransparentSessionStart() ([]byte, error)
- func (c *Scard) TransparentSessionStartOnly() ([]byte, error)
- func (c *Scard) UID() ([]byte, error)
- type State
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Card ¶
type Card interface { smartcard.ICard ControlApdu(ioctl uint32, apdu []byte) ([]byte, error) ControlApduA(ioctl uint32, apdu []byte) ([]byte, error) EndTransaction() error EndTransactionResetCard() error // DisconnectResetCard() error // DisconnectUnpowerCard() error // DisconnectEjectCard() error TransparentSessionStart() ([]byte, error) TransparentSessionStartOnly() ([]byte, error) TransparentSessionResetRF() ([]byte, error) TransparentSessionEnd() ([]byte, error) Switch1444_4() ([]byte, error) Switch1444_3() ([]byte, error) }
Card Interface
type Reader ¶
type Reader interface { smartcard.IReader Name() string ConnectDirect() (Card, error) ConnectCardPCSC() (Card, error) ConnectCardPCSC_T0() (Card, error) ConnectCardPCSC_Tany() (Card, error) }
Interface to Reader device
type Scard ¶ added in v0.1.5
func (*Scard) Apdu ¶ added in v0.1.5
Apdu Primitive function (SCardTransmit) to send command to card
func (*Scard) ControlApdu ¶ added in v0.1.5
ControlApdu Primitive function (SCardControl) to send command to card
func (*Scard) ControlApduA ¶ added in v0.1.6
ControlApdu Primitive function (SCardControl) to send command to card
func (*Scard) DisconnectCard ¶ added in v0.1.5
DisconnectCard Disconnect card from context with card with disposition type LeaveCard
func (*Scard) DisconnectEjectCard ¶ added in v0.1.5
DisconnectEjectCard Disconnect card from context with card with disposition type EjectCard
func (*Scard) DisconnectResetCard ¶ added in v0.1.5
DiconnectResetCard Disconnect card from context with card with disposition type ResetCard
func (*Scard) DisconnectUnpowerCard ¶ added in v0.1.5
DisconnectUnpowerCard Disconnect card from context with card with disposition type UnpowerCard
func (*Scard) EndTransaction ¶ added in v0.1.5
EndTransactionn End transaccion with card with disposition type LeaveCard
func (*Scard) EndTransactionResetCard ¶ added in v0.1.5
EndTransactionResetCard End transaccion with card with disposition type ResetCard
func (*Scard) Switch1444_3 ¶ added in v0.1.5
Switch1444_4 switch channel reader to send ISO 1444-3 APDU
func (*Scard) Switch1444_4 ¶ added in v0.1.5
Switch1444_4 switch channel reader to send ISO 1444-4 APDU
func (*Scard) TransparentSessionEnd ¶ added in v0.1.5
TransparentSessionEnd finish transparent session
func (*Scard) TransparentSessionResetRF ¶ added in v0.1.5
TransparentSessionResetRF start transparent session to send APDU
func (*Scard) TransparentSessionStart ¶ added in v0.1.5
Transparent Session (PCSC)
func (*Scard) TransparentSessionStartOnly ¶ added in v0.1.5
TransparentSessionStartOnly start transparent session to send APDU