Package javacard.framework
Class OwnerPINBuilder
- java.lang.Object
-
- javacard.framework.OwnerPINBuilder
-
public class OwnerPINBuilder extends Object
TheOwnerPINBuilder
class is factory for OwnerPIN
objects.- Since:
- 3.0.5
- See Also:
OwnerPIN
,OwnerPINx
,OwnerPINxWithPredecrement
-
-
Field Summary
Fields Modifier and Type Field Description static byte
OWNER_PIN
The type identifier for the legacyOwnerPIN
.static byte
OWNER_PIN_X
The type identifier forOwnerPINx
.static byte
OWNER_PIN_X_WITH_PREDECREMENT
The type identifier forOwnerPINxWithPredecrement
.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static PIN
buildOwnerPIN(byte tryLimit, byte maxPINSize, byte ownerPINType)
Creates a newPIN
instance of the requested type, maximum allowed PIN size and tries limit, and with thevalidated
flag initially set tofalse
.
-
-
-
Field Detail
-
OWNER_PIN
public static final byte OWNER_PIN
The type identifier for the legacyOwnerPIN
.- See Also:
- Constant Field Values
-
OWNER_PIN_X
public static final byte OWNER_PIN_X
The type identifier forOwnerPINx
.OwnerPINx
- when compared to the legacyOwnerPIN
- allows for changing the tries limit.- See Also:
OwnerPINx.setTryLimit(byte)
, Constant Field Values
-
OWNER_PIN_X_WITH_PREDECREMENT
public static final byte OWNER_PIN_X_WITH_PREDECREMENT
The type identifier forOwnerPINxWithPredecrement
.OwnerPINxWithPredecrement
- when compared toOwnerPINx
- supports the decrementation of the tries counter before any PIN validation attempts.
-
-
Method Detail
-
buildOwnerPIN
public static PIN buildOwnerPIN(byte tryLimit, byte maxPINSize, byte ownerPINType) throws PINException
Creates a newPIN
instance of the requested type, maximum allowed PIN size and tries limit, and with thevalidated
flag initially set tofalse
.- Parameters:
tryLimit
- the maximum number of times an incorrect PIN can be presented;tryLimit
must be >=1.maxPINSize
- the maximum allowed PIN size;maxPINSize
must be >=1.ownerPINType
- the requested Owner PIN type. Valid codes listed inOWNER_*
constants in this class e.g.OWNER_PIN_X
.- Returns:
- a new
PIN
instance. - Throws:
PINException
- with the following reason codes:ILLEGAL_VALUE
iftryLimit
ormaxPINSize
is less than 1 or ifownerPINType
is not one of the defined valid codes.
SystemException
- with the following reason codes:ILLEGAL_USE
if the PIN typeownerPINType
is not implemented.
-
-