Documentation ¶
Overview ¶
* Implementation to mifare smartcard family (Mifare Plus, Desfire, SamAV2, ...) /*
Index ¶
- func AccessConditions(sectorTrailer *AccessBitsSectorTrailer, block2, block1, block0 *AccessBitsData, ...) []byte
- func BitPosition(position int, bit bool) int
- func VerifyResponseIso7816(response []byte) error
- type AccessBitsData
- func (acl *AccessBitsData) Anything() *AccessBitsData
- func (acl *AccessBitsData) OnlyRead_AB() *AccessBitsData
- func (acl *AccessBitsData) OnlyRead_B() *AccessBitsData
- func (acl *AccessBitsData) ReadWrite_B() *AccessBitsData
- func (acl *AccessBitsData) Read_AB_Value_AB() *AccessBitsData
- func (acl *AccessBitsData) Read_AB_Write_B() *AccessBitsData
- func (acl *AccessBitsData) SetPlain() *AccessBitsData
- func (acl *AccessBitsData) Whole_AB() *AccessBitsData
- func (acl *AccessBitsData) Whole_B_Read_A_Value_A() *AccessBitsData
- type AccessBitsSectorTrailer
- func (acl *AccessBitsSectorTrailer) KeyAB__ReadACL() *AccessBitsSectorTrailer
- func (acl *AccessBitsSectorTrailer) KeyAB__ReadACL2() *AccessBitsSectorTrailer
- func (acl *AccessBitsSectorTrailer) KeyA__ReadACL_ReadB() *AccessBitsSectorTrailer
- func (acl *AccessBitsSectorTrailer) KeyA__ReadA_ReadWriteACL_ReadWriteB() *AccessBitsSectorTrailer
- func (acl *AccessBitsSectorTrailer) KeyA__WriteA_ReadACL_ReadWriteB() *AccessBitsSectorTrailer
- func (acl *AccessBitsSectorTrailer) KeyB__ReadWriteACL___KeyA_readACL() *AccessBitsSectorTrailer
- func (acl *AccessBitsSectorTrailer) KeyB__WriteA_ReadACL_WriteB___keyA__ReadACL() *AccessBitsSectorTrailer
- func (acl *AccessBitsSectorTrailer) KeyB__WriteA_ReadWriteACL_WriteB___KeyA_readACL() *AccessBitsSectorTrailer
- func (acl *AccessBitsSectorTrailer) SetPlain() *AccessBitsSectorTrailer
- type Classic
- type INS
- type IReaderClassic
- type MifarePlus
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AccessConditions ¶
func AccessConditions(sectorTrailer *AccessBitsSectorTrailer, block2, block1, block0 *AccessBitsData, sl3 bool) []byte
func BitPosition ¶
func VerifyResponseIso7816 ¶
Types ¶
type AccessBitsData ¶
type AccessBitsData struct {
// contains filtered or unexported fields
}
func NewAccessBits ¶
func NewAccessBits() *AccessBitsData
func (*AccessBitsData) Anything ¶
func (acl *AccessBitsData) Anything() *AccessBitsData
func (*AccessBitsData) OnlyRead_AB ¶
func (acl *AccessBitsData) OnlyRead_AB() *AccessBitsData
func (*AccessBitsData) OnlyRead_B ¶
func (acl *AccessBitsData) OnlyRead_B() *AccessBitsData
func (*AccessBitsData) ReadWrite_B ¶
func (acl *AccessBitsData) ReadWrite_B() *AccessBitsData
func (*AccessBitsData) Read_AB_Value_AB ¶
func (acl *AccessBitsData) Read_AB_Value_AB() *AccessBitsData
func (*AccessBitsData) Read_AB_Write_B ¶
func (acl *AccessBitsData) Read_AB_Write_B() *AccessBitsData
func (*AccessBitsData) SetPlain ¶
func (acl *AccessBitsData) SetPlain() *AccessBitsData
func (*AccessBitsData) Whole_AB ¶
func (acl *AccessBitsData) Whole_AB() *AccessBitsData
func (*AccessBitsData) Whole_B_Read_A_Value_A ¶
func (acl *AccessBitsData) Whole_B_Read_A_Value_A() *AccessBitsData
type AccessBitsSectorTrailer ¶
type AccessBitsSectorTrailer struct {
// contains filtered or unexported fields
}
func NewAccessBitsSectorTrailer ¶
func NewAccessBitsSectorTrailer() *AccessBitsSectorTrailer
func (*AccessBitsSectorTrailer) KeyAB__ReadACL ¶
func (acl *AccessBitsSectorTrailer) KeyAB__ReadACL() *AccessBitsSectorTrailer
func (*AccessBitsSectorTrailer) KeyAB__ReadACL2 ¶
func (acl *AccessBitsSectorTrailer) KeyAB__ReadACL2() *AccessBitsSectorTrailer
func (*AccessBitsSectorTrailer) KeyA__ReadACL_ReadB ¶
func (acl *AccessBitsSectorTrailer) KeyA__ReadACL_ReadB() *AccessBitsSectorTrailer
func (*AccessBitsSectorTrailer) KeyA__ReadA_ReadWriteACL_ReadWriteB ¶
func (acl *AccessBitsSectorTrailer) KeyA__ReadA_ReadWriteACL_ReadWriteB() *AccessBitsSectorTrailer
func (*AccessBitsSectorTrailer) KeyA__WriteA_ReadACL_ReadWriteB ¶
func (acl *AccessBitsSectorTrailer) KeyA__WriteA_ReadACL_ReadWriteB() *AccessBitsSectorTrailer
func (*AccessBitsSectorTrailer) KeyB__ReadWriteACL___KeyA_readACL ¶
func (acl *AccessBitsSectorTrailer) KeyB__ReadWriteACL___KeyA_readACL() *AccessBitsSectorTrailer
func (*AccessBitsSectorTrailer) KeyB__WriteA_ReadACL_WriteB___keyA__ReadACL ¶
func (acl *AccessBitsSectorTrailer) KeyB__WriteA_ReadACL_WriteB___keyA__ReadACL() *AccessBitsSectorTrailer
func (*AccessBitsSectorTrailer) KeyB__WriteA_ReadWriteACL_WriteB___KeyA_readACL ¶
func (acl *AccessBitsSectorTrailer) KeyB__WriteA_ReadWriteACL_WriteB___KeyA_readACL() *AccessBitsSectorTrailer
func (*AccessBitsSectorTrailer) SetPlain ¶
func (acl *AccessBitsSectorTrailer) SetPlain() *AccessBitsSectorTrailer
type Classic ¶
type Classic interface { smartcard.ICard Auth(bNr, keyType int, key []byte) ([]byte, error) ReadBlocks(bNr, ext int) ([]byte, error) WriteBlock(bNr int, data []byte) ([]byte, error) Inc(bNr int, data []byte) error Dec(bNr int, data []byte) error Copy(bNr, dstBnr int) error }
Classic Mifare Plus Interface
func ConnectMclassic ¶
func ConnectMclassic(r IReaderClassic) (Classic, error)
ConnectMclassic Create Mifare Plus Interface
type IReaderClassic ¶
type MifarePlus ¶
type MifarePlus interface { smartcard.ICard WritePerso(int, []byte) ([]byte, error) //SL0 CommitPerso() ([]byte, error) //SL0 FirstAuthf1(keyBNr int) ([]byte, error) FirstAuthf2([]byte) ([]byte, error) FirstAuth(keyBNr int, key []byte) ([]byte, error) ReadPlainMacMac(bNr, ext int) ([]byte, error) ReadPlainMacUnMacCommand(bNr, ext int) ([]byte, error) ReadEncMacMac(bNr, ext int) ([]byte, error) WriteEncMacMac(bNr int, data []byte) error IncTransfEncMacMac(bNr int, data []byte) error DecTransfEncMacMac(bNr int, data []byte) error TransfMacMac(bNr int) error KeyEnc(key []byte) KeyMac(key []byte) Ti(ti []byte) ReadCounter(counter int) WriteCounter(counter int) }
MifarePlus MifarePlus Interface
func ConnectMplus ¶
func ConnectMplus(r smartcard.IReader) (MifarePlus, error)
ConnectMplus Create Mifare Plus Interface
Click to show internal directories.
Click to hide internal directories.