|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectit.dtt.ca.CAObject
it.dtt.ca.Pin
public abstract class Pin
This class represents a Personal Identification Number (PIN). It allows to use and change the PIN codes stored either on the STB or on the smart card.
Field Summary | |
---|---|
static java.lang.String |
HISTORY_PIN
Indicates the PIN proteting access to history data. |
static java.lang.String |
PARENTAL_CONTROL_PIN
Indicates the PIN providing parental control. |
static java.lang.String |
SMART_CARD_PIN
Indicates the PIN protecting the CA System functionalities of the smart card. |
Constructor Summary | |
---|---|
protected |
Pin(CAObject owner,
java.lang.String name)
Create an instance of a PIN. |
Method Summary | |
---|---|
abstract void |
change(byte[] pin)
Deprecated. |
abstract void |
change(byte[] oldPin,
byte[] newPin)
This method sets a new value for the PIN, resets the PIN try counter to the value of the PIN try limit, and resets the validated flag. |
abstract boolean |
check(byte[] pin)
Check if the Pin is correct. |
java.lang.String |
getPinName()
Get the name that identifies this PIN. |
abstract byte |
getTriesRemaining()
Retrieves remaining tries of the pin before smart card is blocked. |
abstract boolean |
isRequired()
This method is used to determine if the specific PIN is required. |
abstract boolean |
isValidated()
Retrieves if the current pin is validated since the smart card has been reset last time |
abstract void |
reset()
Resets the validate flag. |
abstract void |
setRequired(boolean required)
Enable or disable the PIN code usage. |
Methods inherited from class it.dtt.ca.CAObject |
---|
checkSession, closeSession, getParent, getSession, sessionClosed, sessionClosing |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String SMART_CARD_PIN
public static final java.lang.String HISTORY_PIN
public static final java.lang.String PARENTAL_CONTROL_PIN
Constructor Detail |
---|
protected Pin(CAObject owner, java.lang.String name)
owner
- the owner of this PIN, either a SmartCard or a CAManager.name
- the name of this PIN.Method Detail |
---|
public java.lang.String getPinName()
public abstract void setRequired(boolean required) throws CardNotFoundException, SessionClosedException, AccessDeniedException
required
- pin mode, when true the PIN is required.
CardNotFoundException
- if the PIN was stored on a smart card that is not present anymore in the slot.
SessionClosedException
- if the session is closed.
AccessDeniedException
- if enabling or disabling the PIN code is not allowed.public abstract boolean isRequired() throws CardNotFoundException, SessionClosedException
CardNotFoundException
- if the PIN was stored on a smart card that is not present anymore in the slot.
SessionClosedException
- if the session is closed.public abstract boolean check(byte[] pin) throws CardNotFoundException, SessionClosedException
pin
- the pin entered.
CardNotFoundException
- if the PIN was stored on a smart card that is not present anymore in the slot.
SessionClosedException
- if the session is closed.public abstract byte getTriesRemaining() throws CardNotFoundException, SessionClosedException
CardNotFoundException
- if the PIN was stored on a smart card that is not present anymore in the slot.
SessionClosedException
- if the session is closed.public abstract boolean isValidated() throws CardNotFoundException, SessionClosedException
CardNotFoundException
- if the PIN was stored on a smart card that is not present anymore in the slot.
SessionClosedException
- if the session is closed.public abstract void reset() throws CardNotFoundException, SessionClosedException
CardNotFoundException
- if the PIN was stored on a smart card that is not present anymore in the slot.
SessionClosedException
- if the session is closed.public abstract void change(byte[] oldPin, byte[] newPin) throws InvalidPinException, CardNotFoundException, SessionClosedException, AccessDeniedException
oldPin
- the byte array containing the old PIN value.newPin
- the byte array containing the new PIN value.
InvalidPinException
- if the oldPin is not correct, or if newPin length is greater than the maximum PIN size.
CardNotFoundException
- if the PIN was stored on a smart card that is not present anymore in the slot.
SessionClosedException
- if the session is closed.
AccessDeniedException
- if changing the PIN code is not allowed.public abstract void change(byte[] pin) throws InvalidPinException, CardNotFoundException, SessionClosedException, AccessDeniedException
pin
- the byte array containing the new PIN value.
InvalidPinException
- if the oldPin is not correct, or if newPin length is greater than the maximum PIN size.
CardNotFoundException
- if the PIN was stored on a smart card that is not present anymore in the slot.
SessionClosedException
- if the session is closed.
AccessDeniedException
- if changing the PIN code is not allowed.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |