|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.upek.android.ptapi.PtUtil
public class PtUtil
This class contains some utility functions for simplify some operations manipulating with structures stored in bytearray (original PT_DATA)
Constructor Summary | |
---|---|
PtUtil()
|
Method Summary | |
---|---|
static void |
clearAccessRightsBit(byte[] accessRights,
int bit)
Macro for clearing one of the access rights bit. |
static byte |
decodeByte(byte[] x)
Decodes number from byte array with byte number in little endien. |
static int |
decodeInt(byte[] x)
Decodes number from byte array with int number in little endien. |
static long |
decodeLong(byte[] x)
Decodes number from byte array with long number in little endien. |
static short |
decodeShort(byte[] x)
Decodes number from byte array with short number in little endien. |
static byte[] |
decodeUseFingerResult(byte[] result)
Decode result byte array from byte array returned by useFingerData(). |
static int |
decodeUseFingerResultDWORD(byte[] result)
Decode DWORD (= int in JAVA) from byte array returned by useFingerData(). |
static byte[] |
encodeNumber(byte x)
Encodes number in byte array in little endien order. |
static byte[] |
encodeNumber(int x)
Encodes number in byte array in little endien order. |
static byte[] |
encodeNumber(long x)
Encodes number in byte array in little endien order. |
static byte[] |
encodeNumber(short x)
Encodes number in byte array in little endien order. |
static byte[] |
encodeUseFingerParams(byte[] prm1)
Use this function for encoding of parameters for function PtConnectionAdvancedI.useFingerData(). |
static byte[] |
encodeUseFingerParams(byte[] prm1,
byte[] prm2)
Use this function for encoding of parameters for function PtConnectionAdvancedI.useFingerData(). |
static byte[] |
encodeUseFingerParams(byte[] prm1,
byte[] prm2,
byte[] prm3)
Use this function for encoding of parameters for function PtConnectionAdvancedI.useFingerData(). |
static boolean |
getAccessRightsBit(byte[] accessRights,
int bit)
Macro for getting state of one of the access rights bit. |
static byte[] |
getAuthKey(int type,
byte[] key)
Generate bytearray representing key of specified type (use PT_SECURECHANNEL_MECH_DES_CBC or PT_SECURECHANNEL_MECH_AES_CBC constants). |
static void |
setAccessRightsBit(byte[] accessRights,
int bit)
Macro for setting one of the access rights bit. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PtUtil()
Method Detail |
---|
public static final void clearAccessRightsBit(byte[] accessRights, int bit)
accessRights
- Access rights byte array.bit
- The number of access right to be cleared.public static final byte decodeByte(byte[] x)
x
- is byte array of length at least 1 with number in little endien.
public static final int decodeInt(byte[] x)
x
- is byte array length at least 4 with number in little endien.
public static final long decodeLong(byte[] x)
x
- is byte array length at least 8 with number in little endien.
public static final short decodeShort(byte[] x)
x
- is byte array of length at least 2 with number in little endien.
public static final byte[] decodeUseFingerResult(byte[] result)
result
- Byte array returned by useFingerData().
public static final int decodeUseFingerResultDWORD(byte[] result)
result
- Byte array returned by useFingerData().
public static final byte[] encodeNumber(byte x)
x
- is number to encode.
public static final byte[] encodeNumber(int x)
x
- is number to encode.
public static final byte[] encodeNumber(long x)
x
- is number to encode.
public static final byte[] encodeNumber(short x)
x
- is number to encode.
public static final byte[] encodeUseFingerParams(byte[] prm1)
prm1
- First parameter for operation useFingerData.
public static final byte[] encodeUseFingerParams(byte[] prm1, byte[] prm2)
prm1
- First parameter for operation useFingerData.prm2
- Second parameter for operation useFingerData.
public static final byte[] encodeUseFingerParams(byte[] prm1, byte[] prm2, byte[] prm3)
prm1
- First parameter for operation useFingerData.prm2
- Second parameter for operation useFingerData.prm3
- Third parameter for operation useFingerData.
public static final boolean getAccessRightsBit(byte[] accessRights, int bit)
accessRights
- Access rights byte array.bit
- Number of access right to be read.
public static final byte[] getAuthKey(int type, byte[] key)
type
- Type of keykey
- Raw key data
public static final void setAccessRightsBit(byte[] accessRights, int bit)
accessRights
- Access rights byte array.bit
- The number of access right to be set.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |