Class Pin
Class represents a PIN that protects smart card contents.
Inheritance
Inherited Members
Namespace: scmapi
Assembly: scmapi.dll
Syntax
public class Pin
Methods
Change(String, String)
Changes the PIN. The operation can only be made against the user PIN.
Declaration
public void Change(string oldValue, string newValue)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | oldValue | the current PIN value. May be |
| System.String | newValue | the new PIN value. May be |
GetConstraints()
Gets the format constraints of the PIN as an array of PinConstraint object.
Declaration
public PinConstraint[] GetConstraints()
Returns
| Type | Description |
|---|---|
| PinConstraint[] | the PinConstraint list. |
GetLabel()
Gets the PIN label. Can be undefined if the card has a single PIN without explicit label defined.
Declaration
public string GetLabel()
Returns
| Type | Description |
|---|---|
| System.String | the PIN label. |
GetRemainingTries()
Returns the number of remaining tries for the PIN verification. Can be undefined if the information is unavailable.
Declaration
public int GetRemainingTries()
Returns
| Type | Description |
|---|---|
| System.Int32 | the number of remaining tries for the PIN verification. |
GetToken()
Returns Token object this PIN belongs to.
Declaration
public Token GetToken()
Returns
| Type | Description |
|---|---|
| Token | the Token object. |
InitPin(String)
Reinitializes the PIN value (eventually unblocking it, if required). The operation can only be made against the user PIN, and requires the security officer PIN to be verified.
Declaration
public void InitPin(string newValue)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | newValue | the new PIN value. May be |
IsBlocked()
Return trueif the PIN is blocked.
Declaration
public bool IsBlocked()
Returns
| Type | Description |
|---|---|
| System.Boolean |
|
IsInitialized()
Return true if the PIN has been initialized.
Declaration
public bool IsInitialized()
Returns
| Type | Description |
|---|---|
| System.Boolean |
|
IsLastTry()
Return true if the PIN try counter shows only one attempt remaining.
Declaration
public bool IsLastTry()
Returns
| Type | Description |
|---|---|
| System.Boolean |
|
IsTobeChanged()
Return true if the PIN need to be changed before use.
Declaration
public bool IsTobeChanged()
Returns
| Type | Description |
|---|---|
| System.Boolean |
|
IsTryCountLow()
Return true if the PIN try counter is lower than the maximum (an unsuccessful verification attempt has been made).
Declaration
public bool IsTryCountLow()
Returns
| Type | Description |
|---|---|
| System.Boolean |
|
IsValidated()
Return true if the PIN has been successfully verified (access to the private objects is granted).
Declaration
public bool IsValidated()
Returns
| Type | Description |
|---|---|
| System.Boolean |
|
Login(String)
Verifies the PIN.
Declaration
public void Login(string value)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | value | the pin value. May be |
LoginSo(String)
Verifies the Security Officer (administrator or unblocking) PIN
Declaration
public void LoginSo(string value)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | value | the PIN value. May be |
Logout()
Resets the verified status of the PIN.
Declaration
public void Logout()