Documentation ¶
Index ¶
- Constants
- Variables
- func BuildFrame(header BuildHeader, apdu []byte) ([]byte, error)
- func BuildHeader__PC_to_RDR_Escape(seq int, slot Slot, ledApdu int) func() []byte
- func BuildHeader__PC_to_RDR_IccEspecial(seq int, slot Slot, lenApdu int) func() []byte
- func BuildHeader__PC_to_RDR_IccPowerOff(seq int, slot Slot) func() []byte
- func BuildHeader__PC_to_RDR_IccPowerOn(seq int, slot Slot) func() []byte
- func BuildHeader__PC_to_RDR_XfrBlock(seq int, slot Slot, ledApdu int) func() []byte
- func Checksum(data []byte) byte
- func GetResponse__RDR_to_PC_DataBlock(frame []byte) ([]byte, error)
- func GetResponse__RDR_to_PC_Escape(frame []byte) ([]byte, error)
- func GetResponse__RDR_to_PC_SlotStatus(frame []byte) ([]byte, error)
- func VerifyStatusReponse(statusFrame []byte) error
- type BuildHeader
- type Card
- func (c *Card) ATR() ([]byte, error)
- func (c *Card) ATS() ([]byte, error)
- func (c *Card) Apdu(apdu []byte) ([]byte, error)
- func (c *Card) DisconnectCard() error
- func (c *Card) DisconnectResetCard() error
- func (c *Card) EndTransactionResetCard() error
- func (c *Card) GetData(data byte) ([]byte, error)
- func (c *Card) SAK() byte
- func (c *Card) UID() ([]byte, error)
- type Device
- type Reader
- func (r *Reader) ConnectCard() (smartcard.ICard, error)
- func (r *Reader) ConnectMifareClassic() (mifare.Classic, error)
- func (r *Reader) ConnectSamCard() (smartcard.ICard, error)
- func (r *Reader) ConnectSamCard_T0() (smartcard.ICard, error)
- func (r *Reader) ConnectSamCard_Tany() (smartcard.ICard, error)
- func (r *Reader) EscapeCommand(apdu []byte) ([]byte, error)
- func (r *Reader) IccEspecial() ([]byte, error)
- func (r *Reader) IccPowerOff() ([]byte, error)
- func (r *Reader) IccPowerOn() ([]byte, error)
- func (r *Reader) Transmit(apdu []byte) ([]byte, error)
- type Slot
Constants ¶
View Source
const ( SLOT_SAM = 2 SLOT_ICC = 1 SLOT_PICC = 0 )
Variables ¶
View Source
var FRAME_NACK = []byte{0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03}
Functions ¶
func BuildFrame ¶
func BuildFrame(header BuildHeader, apdu []byte) ([]byte, error)
func VerifyStatusReponse ¶
Types ¶
type BuildHeader ¶
type BuildHeader func() []byte
type Card ¶
type Card struct {
// contains filtered or unexported fields
}
func (*Card) DisconnectCard ¶
func (*Card) DisconnectResetCard ¶
func (*Card) EndTransactionResetCard ¶
type Device ¶
type Device struct {
// contains filtered or unexported fields
}
Device struct
type Reader ¶
type Reader struct {
// contains filtered or unexported fields
}
func (*Reader) ConnectCard ¶
ConnectCard Create New Card interface with T=1
func (*Reader) ConnectMifareClassic ¶
func (*Reader) ConnectSamCard ¶
ConnectSamCard Create New contact Card interface with T=1
func (*Reader) ConnectSamCard_T0 ¶
ConnectSamCard_T0 ConnectCard connect card with protocol T=1.
func (*Reader) ConnectSamCard_Tany ¶
ConnectSamCard_Tany ConnectCard connect card with protocol T=any.
func (*Reader) EscapeCommand ¶
EscapeCommand Primitive function to send Control commands
func (*Reader) IccPowerOff ¶
IccPowerOff Power off contact card
func (*Reader) IccPowerOn ¶
IccPowerOn Power on contact card
Click to show internal directories.
Click to hide internal directories.