|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--com.ibutton.cib.CibReturnPacket
Class that encapsulates the return packet from a Crypto iButton.
| Constructor Summary | |
CibReturnPacket(int[] rawData)
Construct an instance with the given data. |
|
CibReturnPacket(int csb,
int groupID,
int[] data)
Construct an instance with the given data. |
|
| Method Summary | |
int |
getCSB()
Get the command status byte. |
int |
getGroupID()
Get the group ID of the return packet. |
byte[] |
getReturnBytes()
Get the return data as a byte array. |
char[] |
getReturnChars()
Get the return data as a char array. |
char[] |
getReturnChars(int start,
int count)
Get the count bytes of return data as a char array beginning at the specified offset. |
int |
getReturnInteger()
Get the first byte of the body as an integer. |
int |
getReturnInteger(int index)
Get a byte of the return data as an integer. |
int[] |
getReturnInts()
Get the return data as an integer array. |
int |
getReturnShort()
Get the first byte of the body as a short. |
int |
getReturnShort(int index)
Get a byte of the return data as an short. |
java.lang.String |
getReturnString()
Get the return data in String format. |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Field Detail |
public static final int CSB_OK
public static final int CMD_OK
public static final int ERR_BAD_comMON_PIN
public static final int ERR_BAD_GROUP_PIN
public static final int ERR_BAD_PIN_LENGTH
public static final int ERR_BAD_NAME_LENGTH
public static final int ERR_INSUFFICIENT_RAM
public static final int ERR_CIB_LOCKED
public static final int ERR_CIB_NOT_LOCKED
public static final int ERR_GROUP_LOCKED
public static final int ERR_BAD_OBJECT_TYPE
public static final int ERR_BAD_OBJECT_ATTR
public static final int ERR_BAD_SIZE
public static final int ERR_BAD_GROUP_ID
public static final int ERR_BAD_OBJECT_ID
public static final int ERR_OBJECT_LOCKED
public static final int ERR_OBJECT_PRIVATE
public static final int ERR_MAX_GROUPS
public static final int ERR_MAX_OBJECTS
public static final int ERR_NOT_SCRIPT_ID
public static final int ERR_OPEN_GROUP
public static final int ERR_BAD_GROUP_CRC
public static final int ERR_BAD_PACKET_LEN
public static final int ERR_GROUP_NOT_FOUND
public static final int ERR_NO_KEY_GENERATION
public static final int ERR_BAD_MODULUS_SIZE
public static final int ERR_KEY_GEN_DISABLED
public static final int ERR_EXP_NOT_REL_PRIME
public static final int ERR_EXP_SIZE
public static final int ERR_RNG_MONOBIT_TEST
public static final int ERR_RNG_POKER_TEST
public static final int ERR_RNG_RUNS_TEST
public static final int ERR_RNG_LONG_RUNS_TEST
public static final int ERR_RNG_ERR_STATE
public static final int ERR_KAT_FAILURE
public static final int ERR_ROM_CRC
public static final int ERR_KEY_CONSISTENCY
| Constructor Detail |
public CibReturnPacket(int[] rawData)
rawData - - the data of the return packet.
public CibReturnPacket(int csb,
int groupID,
int[] data)
csb - - Command Status Byte.groupID - - the group number the command was performed on.data - - the body of the received data.| Method Detail |
public int getCSB()
public int getGroupID()
public java.lang.String getReturnString()
public int getReturnInteger(int index)
index - - the index into the body of the return data.public int getReturnInteger()
public int getReturnShort(int index)
index - - the index into the body of the return data.public int getReturnShort()
public byte[] getReturnBytes()
public char[] getReturnChars()
public char[] getReturnChars(int start,
int count)
start - - the offset into the data array.count - - the number of bytes to read.public int[] getReturnInts()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||