Support PIN block format 2
This commit is contained in:
@@ -39,22 +39,47 @@ public final class Constants {
|
||||
protected static final byte USER_PIN_RETRY_COUNT = 3;
|
||||
protected static final byte USER_PIN_MIN_SIZE = 0x06;
|
||||
protected static final byte USER_PIN_MAX_SIZE = 0x7f; /* max is 0x7f because PIN format 2 */
|
||||
protected static final byte USER_PIN_MIN_SIZE_FORMAT_2 = 6;
|
||||
protected static final byte USER_PIN_MAX_SIZE_FORMAT_2 = 12;
|
||||
protected static final byte[] USER_PIN_DEFAULT = {
|
||||
0x31, 0x32, 0x33,0x34, 0x35, 0x36
|
||||
};
|
||||
protected static final boolean USER_PIN_DEFAULT_IS_FORMAT_2 = false;
|
||||
/*
|
||||
protected static final byte[] USER_PIN_DEFAULT = {
|
||||
(byte)0x26,
|
||||
(byte)0x12, (byte)0x34, (byte)0x56, (byte)0xff, (byte)0xff,
|
||||
(byte)0xff, (byte)0xff
|
||||
};
|
||||
protected static final boolean USER_PIN_DEFAULT_IS_FORMAT_2 = true;
|
||||
*/
|
||||
|
||||
protected static final boolean USER_PIN_DEFAULT_FORCE_VERIFY_SIGNATURE = true;
|
||||
|
||||
protected static final byte USER_PUK_RETRY_COUNT = 3;
|
||||
protected static final byte USER_PUK_MIN_SIZE = 0x08;
|
||||
protected static final byte USER_PUK_MAX_SIZE = 0x7f; /* max is 0x7f because PIN format 2 */
|
||||
protected static final byte USER_PUK_MIN_SIZE_FORMAT_2 = 8;
|
||||
protected static final byte USER_PUK_MAX_SIZE_FORMAT_2 = 12;
|
||||
|
||||
protected static final byte ADMIN_PIN_RETRY_COUNT = 3;
|
||||
protected static final byte ADMIN_PIN_MIN_SIZE = 0x08;
|
||||
protected static final byte ADMIN_PIN_MAX_SIZE = 0x7f; /* max is 0x7f because PIN format 2 */
|
||||
protected static final byte ADMIN_PIN_MIN_SIZE_FORMAT_2 = 8;
|
||||
protected static final byte ADMIN_PIN_MAX_SIZE_FORMAT_2 = 12;
|
||||
protected static final byte[] ADMIN_PIN_DEFAULT = {
|
||||
0x31, 0x32, 0x33,0x34, 0x35, 0x36, 0x37, 0x38
|
||||
};
|
||||
protected static final boolean ADMIN_PIN_DEFAULT_IS_FORMAT_2 = false;
|
||||
/*
|
||||
protected static final byte[] ADMIN_PIN_DEFAULT = {
|
||||
(byte)0x28,
|
||||
(byte)0x12, (byte)0x34, (byte)0x56, (byte)0x78, (byte)0xff,
|
||||
(byte)0xff, (byte)0xff
|
||||
};
|
||||
protected static final boolean ADMIN_PIN_DEFAULT_IS_FORMAT_2 = true;
|
||||
*/
|
||||
|
||||
|
||||
protected static final byte FINGERPRINT_SIZE = 20;
|
||||
protected static final byte GENERATION_DATE_SIZE = 4;
|
||||
@@ -167,7 +192,7 @@ public final class Constants {
|
||||
(byte)0x00, (byte)0x20, /* max length get challenge */
|
||||
(byte)0x04, (byte)0x80, /* max length of carholder certificate */
|
||||
(byte)0x00, (byte)0xff, /* max length of special DOs (private, login, url, KDF-DO) */
|
||||
(byte)0x00, /* PIN format 2 not supported */
|
||||
(byte)0x01, /* PIN format 2 is supported */
|
||||
(byte)0x00 /* MSE not supported */
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user