MifareClassicCard Class Reference

MifareClassic card. More...

Inheritance diagram for MifareClassicCard:

Classes

enum  Capacity
 MifareClassic Capacity. More...
 

Public Member Functions

Capacity getCapacity ()
 
List< SmartCardInformationBlockwriteBlocksForceKey (List< Entry< SmartCardInformationBlock, KeyType >> blocks) throws SmartCardNotAvailableException, SmartCardLowLevelException
 
List< SmartCardInformationBlockreadBlocksForceKey (List< Entry< Integer, KeyType >> blockIds) throws SmartCardNotAvailableException, SmartCardLowLevelException
 
List< SmartCardInformationBlockreadBlocksForcePriority (List< Entry< Integer, Integer >> blockIds) throws SmartCardNotAvailableException, SmartCardLowLevelException
 
List< SmartCardInformationBlockwriteBlocks (List< SmartCardInformationBlock > blocks) throws SmartCardNotAvailableException, SmartCardLowLevelException
 
List< SmartCardInformationBlockreadBlocks (List< Integer > blockIds) throws SmartCardNotAvailableException, SmartCardLowLevelException
 
Map< Integer, Boolean > transferBlocks (List< SmartCardArithmeticBlock > blocks) throws SmartCardNotAvailableException, SmartCardLowLevelException
 
Map< Integer, Boolean > restoreBlocks (List< SmartCardArithmeticBlock > blocks) throws SmartCardNotAvailableException, SmartCardLowLevelException
 
Map< Integer, Boolean > incrementOnlyBlocks (List< SmartCardArithmeticBlock > blocks) throws SmartCardNotAvailableException, SmartCardLowLevelException
 
Map< Integer, Boolean > decrementOnlyBlocks (List< SmartCardArithmeticBlock > blocks) throws SmartCardNotAvailableException, SmartCardLowLevelException
 
Map< Integer, Boolean > incrementBlocks (List< SmartCardArithmeticBlock > blocks) throws SmartCardNotAvailableException, SmartCardLowLevelException
 
Map< Integer, Boolean > decrementBlocks (List< SmartCardArithmeticBlock > blocks) throws SmartCardNotAvailableException, SmartCardLowLevelException
 
- Public Member Functions inherited from SmartCard
String getUid ()
 
Boolean getCollision ()
 
SmartCardReader getReader ()
 
List< String > sendPasstroughCommands (List< String > commands) throws SmartCardNotAvailableException, SmartCardLowLevelException
 

Detailed Description

MifareClassic card

Member Function Documentation

◆ decrementBlocks()

Map<Integer, Boolean> decrementBlocks ( List< SmartCardArithmeticBlock blocks) throws SmartCardNotAvailableException, SmartCardLowLevelException

Decrement blocks in card

Parameters
blockslist to be transferred
Returns
Map with every result related with its blockId
Exceptions
SmartCardLowLevelException
SmartCardNotAvailableException

◆ decrementOnlyBlocks()

Map<Integer, Boolean> decrementOnlyBlocks ( List< SmartCardArithmeticBlock blocks) throws SmartCardNotAvailableException, SmartCardLowLevelException

Decrement only blocks in card

Parameters
blockslist to be transferred
Returns
Map with every result related with its blockId
Exceptions
SmartCardLowLevelException
SmartCardNotAvailableException

◆ getCapacity()

Capacity getCapacity ( )

Gets card capacity

Returns
list of MifareClassic blocks

◆ incrementBlocks()

Map<Integer, Boolean> incrementBlocks ( List< SmartCardArithmeticBlock blocks) throws SmartCardNotAvailableException, SmartCardLowLevelException

Increment blocks in card

Parameters
blockslist to be transferred
Returns
Map with every result related with its blockId
Exceptions
SmartCardLowLevelException
SmartCardNotAvailableException

◆ incrementOnlyBlocks()

Map<Integer, Boolean> incrementOnlyBlocks ( List< SmartCardArithmeticBlock blocks) throws SmartCardNotAvailableException, SmartCardLowLevelException

Increment only blocks in card

Parameters
blockslist to be transferred
Returns
Map with every result related with its blockId
Exceptions
SmartCardLowLevelException
SmartCardNotAvailableException

◆ readBlocks()

List<SmartCardInformationBlock> readBlocks ( List< Integer >  blockIds) throws SmartCardNotAvailableException, SmartCardLowLevelException

Read blocks from card

Parameters
blockIdsblock ids to be read
Returns
list of MifareClassic blocks
Exceptions
SmartCardLowLevelException
SmartCardNotAvailableException

◆ readBlocksForceKey()

List<SmartCardInformationBlock> readBlocksForceKey ( List< Entry< Integer, KeyType >>  blockIds) throws SmartCardNotAvailableException, SmartCardLowLevelException

Read blocks from card forcing used key (Deprecated, use readBlocksForcePriority instead)

Parameters
blockIdsblock ids to be read and key to be used in each block
Returns
list of MifareClassic blocks
Exceptions
SmartCardLowLevelException
SmartCardNotAvailableException

◆ readBlocksForcePriority()

List<SmartCardInformationBlock> readBlocksForcePriority ( List< Entry< Integer, Integer >>  blockIds) throws SmartCardNotAvailableException, SmartCardLowLevelException

Read blocks from card forcing used priority

Parameters
blockIdsblock ids to be read and priority to be used in each block
Returns
list of MifareClassic blocks
Exceptions
SmartCardLowLevelException
SmartCardNotAvailableException

◆ restoreBlocks()

Map<Integer, Boolean> restoreBlocks ( List< SmartCardArithmeticBlock blocks) throws SmartCardNotAvailableException, SmartCardLowLevelException

Restore blocks in card

Parameters
blockslist to be transferred
Returns
Map with every result related with its blockId
Exceptions
SmartCardLowLevelException
SmartCardNotAvailableException

◆ transferBlocks()

Map<Integer, Boolean> transferBlocks ( List< SmartCardArithmeticBlock blocks) throws SmartCardNotAvailableException, SmartCardLowLevelException

Transfer blocks in card

Parameters
blockslist to be transferred
Returns
Map with every result related with its blockId
Exceptions
SmartCardLowLevelException
SmartCardNotAvailableException

◆ writeBlocks()

Write blocks in card

Parameters
blockslist to be written
Returns
blocks list with result
Exceptions
SmartCardLowLevelException
SmartCardNotAvailableException

◆ writeBlocksForceKey()

Write blocks in card forcing used key (Deprecated, use writeBlocks using SmartCardInformationBlock.priority field instead)

Parameters
blockslist to be written and key to be used in each block
Returns
blocks list with result
Exceptions
SmartCardLowLevelException
SmartCardNotAvailableException