java.lang.Object
dev.hloth.zgztransport.Key
A six byte MIFARE Classic sector key.
-
Field Summary
Fields -
Method Summary
-
Field Details
-
BYTES
public static final int BYTESBytes a key takes.- See Also:
-
-
Method Details
-
of
The key those bytes hold.- Parameters:
bytes- the six bytes, which are copied- Returns:
- the key
- Throws:
CardFormatException- if the input is not six bytes
-
of
The key those twelve hex digits spell, as key tables and dump tools print them.- Parameters:
hex- the twelve hex digits, in either case- Returns:
- the key
- Throws:
IllegalArgumentException- if the text is not twelve hex digits
-
bytes
public byte[] bytes()The bytes of this key.- Returns:
- a copy of the six bytes
-
equals
-
hashCode
public int hashCode() -
toString
The key as twelve upper case hex digits.
-