Documentation
¶
Index ¶
- Variables
- func HasAttribute(attr scard.Attrib, value []byte) filter.Filter
- func NewCard(ctx *scard.Context, reader string, shared bool) (*iso.Card, error)
- func OpenCards(ctx *scard.Context, cnt int, flt filter.Filter, shared bool) (cards []iso.PCSCCard, err error)
- func OpenFirstCard(ctx *scard.Context, flt filter.Filter, shared bool) (iso.PCSCCard, error)
- type Card
- func (c *Card) Base() iso.PCSCCard
- func (c *Card) BeginTransaction() error
- func (c *Card) Close() error
- func (c *Card) EndTransaction() error
- func (c *Card) Metadata() (meta map[string]string)
- func (c *Card) Reader() string
- func (c *Card) Reconnect(reset bool) (err error)
- func (c *Card) Transmit(cmd []byte) ([]byte, error)
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func HasAttribute ¶
HasAttribute uses the PCSC API SCardGetAttrib to check if the card has given attribute
func NewCard ¶
NewCard creates a new card by connecting via the PC/SC API.
Types ¶
type Card ¶
Card implements the iso7816.PCSCCard interface via github.com/ebfe/scard.
func (*Card) BeginTransaction ¶
BeginTransaction wraps SCardBeginTransaction.
func (*Card) EndTransaction ¶
EndTransaction wraps SCardEndTransaction.
func (*Card) Metadata ¶ added in v0.5.0
See: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardgetattrib
func (*Card) Reader ¶ added in v0.8.6
Reader returns the name of the reader.
func (*Card) Reconnect ¶ added in v0.6.0
Reset reconnects and resets the card
Source Files
¶
- card.go
- filter.go
- meta.go
- open.go
Click to show internal directories.
Click to hide internal directories.