Interface OwnerPINx
-
- All Superinterfaces:
PIN
- All Known Subinterfaces:
OwnerPINxWithPredecrement
public interface OwnerPINx extends PIN
TheOwnerPINxinterface represents an Owner PIN, extends Personal Identification Number functionality as defined in thePINinterface, and provides the ability to update the PIN, update the try limit and try counter and thus owner functionality.If an implementation of this interface creates transient arrays, it must ensure that they are
CLEAR_ON_RESETtransient objects.Some methods of this interface are only suitable for sharing when there exists a trust relationship among the applets. A typical shared usage would use a proxy PIN interface which extends both the
PINinterface and theShareableinterface and re-declares the methods of thePINinterface.Any of the methods of the
OwnerPINxmay be called with a transaction in progress. None of the methods of anOwnerPINx-implementing class must initiate or alter the state of the transaction if one is in progress.While update of the internal state shall not participate in an on-going transaction during PIN presentation (using
check), update of the internal state during administrative operations (e.g.setTriesRemaining) shall participate in a transaction, if one is in progress. Therefore, care must be taken to not mix PIN presentation operations and administrative operations within the same transaction.- Since:
- 3.0.5
- See Also:
PINException,PIN,Shareable,JCSystem,OwnerPINBuilder
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description bytegetTryLimit()Returns the the maximum number of times an incorrect PIN can be presented before the PIN is blocked.voidsetTriesRemaining(byte remaining)Sets thePINtry counter to the value of theremainingparameter and resets the validated flag.voidsetTryLimit(byte limit)Sets thePINtry limit to the value of thelimitparameter and resets the validated flag.voidupdate(byte[] pin, short offset, byte length)Sets a new value for the PIN and resets thePINtry counter to the value of thePINtry limit.-
Methods inherited from interface javacard.framework.PIN
check, getTriesRemaining, isValidated, reset
-
-
-
-
Method Detail
-
update
void update(byte[] pin, short offset, byte length) throws PINExceptionSets a new value for the PIN and resets thePINtry counter to the value of thePINtry limit. It also resets the validated flag.This method copies the input pin parameter into an internal representation. If a transaction is in progress, the new pin and try counter update must be conditional i.e the copy operation must use the transaction facility.
- Parameters:
pin- the byte array containing the new PIN value.offset- the starting offset in the pin array.length- the length of the new PIN.- Throws:
PINException- with the following reason codes:ILLEGAL_VALUEif length is greater than configured maximum PIN size.
- See Also:
JCSystem.beginTransaction
-
getTryLimit
byte getTryLimit()
Returns the the maximum number of times an incorrect PIN can be presented before the PIN is blocked.In addition to returning a
byteresult, platform-implementations of this method set the result in an internal state which can be rechecked using assertion methods of theSensitiveResultclass, if supported by the platform.- Returns:
- the maximum number of times an incorrect PIN can be presented.
-
setTryLimit
void setTryLimit(byte limit)
Sets thePINtry limit to the value of thelimitparameter and resets the validated flag. The try counter is set to the the new try limit value.- Parameters:
limit- the new value for the maximum number of times an incorrect PIN can be presented;limitmust be >=1.- Throws:
PINException- with the following reason codes:ILLEGAL_VALUEiflimitparameter is less than 1.
-
setTriesRemaining
void setTriesRemaining(byte remaining)
Sets thePINtry counter to the value of theremainingparameter and resets the validated flag. If the new try counter value is zero, it blocks thePIN.- Parameters:
remaining- the new value for the remaining number of times an incorrect PIN can be presented;remainingmust be greater or equal to0and lesser or equal to the current try limit.- Throws:
PINException- with the following reason codes:ILLEGAL_VALUEifremainingparameter is less than0or greater than the current try limit.
-
-