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 github.com/ebfe/scard
/*
* package to handle the communication of "omnikey/multi-iso" reader
projects on which it is based:
https://github.com/dumacp/smartcard
/*
Index ¶
Constants ¶
View Source
const ( Loginsucess byte = 'L' Authenticationfailed byte = 'X' Generalfailure byte = 'F' Notaginfield byte = 'N' Operationmodefailure byte = 'O' Outofrange byte = 'R' )
response
View Source
const ( //BinaryMode protocol binary mode BinaryMode int = iota //AsciiMode protocol acsii mode AsciiMode )
Variables ¶
View Source
var ErrDisconnectCard = errors.New("don't Connect to Card")
Functions ¶
Types ¶
type BadChecsum ¶
type BadChecsum []byte
func (BadChecsum) Error ¶
func (e BadChecsum) Error() string
type BadResponse ¶
type BadResponse []byte
func (BadResponse) Error ¶
func (e BadResponse) Error() string
type Card ¶
type Card interface { smartcard.ICard Switch1444_4() ([]byte, error) Switch1444_3() ([]byte, error) }
Card Interface
type Device ¶
type Device struct { Ok bool // contains filtered or unexported fields }
Device struct
type NilResponse ¶
type NilResponse int
func (NilResponse) Error ¶
func (e NilResponse) Error() string
type Reader ¶
type Reader interface { smartcard.IReader mifare.IReaderClassic Transmit([]byte, []byte) ([]byte, error) TransmitAscii([]byte, []byte) ([]byte, error) TransmitBinary([]byte, []byte) ([]byte, error) SendDataFrameTransfer([]byte) ([]byte, error) SetRegister(register byte, data []byte) error GetRegister(register byte) ([]byte, error) SetModeProtocol(mode int) // SetTransmitProtocol(transmitProto TransmitProto) SendAPDU1443_4(data []byte) ([]byte, error) SendSAMDataFrameTransfer(data []byte) ([]byte, error) T1TransactionV2(data []byte) ([]byte, error) // T0TransactionV2(data []byte) ([]byte, error) SetChainning(chainning bool) }
Reader implement IReader interface
func NewMifareClassicReader ¶
NewMifareClassicReader Create mifare classic reader
Click to show internal directories.
Click to hide internal directories.