java.lang.Object
dev.hloth.zgztransport.Uid
The UID of block 0, whose length depends on the chip the card is built on.
-
Method Summary
Modifier and TypeMethodDescriptionbyte[]bytes()The bytes of this UID.chip()The chip this UID belongs to.static Uiddecode(byte[] block) Decodes block 0 by looking for the SAK of each known chip, in the orderChip.DETECTION_ORDERsets.booleaninthashCode()static Uidof(byte[] bytes) The UID those bytes hold, whose length says which chip it belongs to.toString()The UID as upper case hex, the form dump tools print.
-
Method Details
-
of
The UID those bytes hold, whose length says which chip it belongs to.- Parameters:
bytes- the UID bytes, which are copied- Returns:
- the UID
- Throws:
CardFormatException- if no known chip has UIDs of that length
-
decode
Decodes block 0 by looking for the SAK of each known chip, in the orderChip.DETECTION_ORDERsets.- Parameters:
block- the sixteen bytes- Returns:
- the UID
- Throws:
CardFormatException- if the block is not sixteen bytes or carries no known SAK
-
bytes
public byte[] bytes()The bytes of this UID.- Returns:
- a copy of them
-
chip
The chip this UID belongs to.- Returns:
- the chip
-
equals
-
hashCode
public int hashCode() -
toString
The UID as upper case hex, the form dump tools print.
-