Interface LegacySam
- All Superinterfaces:
org.eclipse.keypop.reader.selection.spi.SmartCard
public interface LegacySam
extends org.eclipse.keypop.reader.selection.spi.SmartCard
Extends the
SmartCard
interface of the "Keypop Reader API" to provide additional
functionality specific to Calypso legacy SAMs.
An instance of LegacySam
is obtained by casting the SmartCard
object from the
selection process defined by the "Keypop Reader API".
It is a dynamic view of the SAM's content, regularly updated from the selection stage to the end of the transaction.
- Since:
- 0.1.0
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enum
All Calypso SAM products supported by this API. -
Method Summary
Modifier and TypeMethodDescriptionbyte
Returns the application subtype.byte
Returns the application type.byte[]
Returns the CA certificate retrieved from the SAM as a 384-byte byte array.getCounter
(int counterNumber) Returns the value of a counter.getCounterCeiling
(int counterNumber) Returns the value of a counter ceiling.Returns the value of known counter ceilings in a sorted map wherekey
is the ceiling number andvalue
is the ceiling value.getCounterIncrementAccess
(int counterNumber) Returns the counter increment access mode.Returns the value of known counters in a sorted map wherekey
is the counter number andvalue
is the counter value.byte
Returns the platform identifier.Returns a text description of the SAM.Returns the SAM product type.Returns the SAM parameters retrieved from the SAM.byte[]
Returns the SAM serial number as a byte array.byte
Returns the software issuer identifier.byte
Returns the software revision number.byte
Returns the software version number.getSystemKeyParameter
(SystemKeyType systemKeyType) Returns the parameters of the system key for the specified key type.getWorkKeyParameter
(byte kif, byte kvc) Returns the parameters of the work key referenced by its KIF and KVC.getWorkKeyParameter
(int recordNumber) Returns the parameters of the work key referenced by its record number.Methods inherited from interface org.eclipse.keypop.reader.selection.spi.SmartCard
getPowerOnData
-
Method Details
-
getProductType
LegacySam.ProductType getProductType()Returns the SAM product type.- Returns:
- The identified product type.
- Since:
- 0.1.0
-
getProductInfo
String getProductInfo()Returns a text description of the SAM.- Returns:
- A non-null string.
- Since:
- 0.1.0
-
getSerialNumber
byte[] getSerialNumber()Returns the SAM serial number as a byte array.- Returns:
- A non-null byte array.
- Since:
- 0.1.0
-
getPlatform
byte getPlatform()Returns the platform identifier.- Returns:
- A byte.
- Since:
- 0.1.0
-
getApplicationType
byte getApplicationType()Returns the application type.- Returns:
- A byte.
- Since:
- 0.1.0
-
getApplicationSubType
byte getApplicationSubType()Returns the application subtype.- Returns:
- A byte.
- Since:
- 0.1.0
-
getSoftwareIssuer
byte getSoftwareIssuer()Returns the software issuer identifier.- Returns:
- A byte.
- Since:
- 0.1.0
-
getSoftwareVersion
byte getSoftwareVersion()Returns the software version number.- Returns:
- A byte.
- Since:
- 0.1.0
-
getSoftwareRevision
byte getSoftwareRevision()Returns the software revision number.- Returns:
- A byte.
- Since:
- 0.1.0
-
getCounter
Returns the value of a counter.- Parameters:
counterNumber
- The number of the counter (in range [0..26]).- Returns:
- Null if the counter value is not set.
- Since:
- 0.1.0
- See Also:
-
getCounters
Returns the value of known counters in a sorted map wherekey
is the counter number andvalue
is the counter value.- Returns:
- A non-null map.
- Since:
- 0.1.0
- See Also:
-
getCounterIncrementAccess
Returns the counter increment access mode.- Parameters:
counterNumber
- The number of the counter being checked.- Returns:
- Null if the counter increment access is unknown.
- Since:
- 0.2.0
- See Also:
-
getCounterCeiling
Returns the value of a counter ceiling.- Parameters:
counterNumber
- The number of the counter ceiling (in range [0..26]).- Returns:
- Null if the counter ceiling value is not set.
- Since:
- 0.1.0
- See Also:
-
getCounterCeilings
Returns the value of known counter ceilings in a sorted map wherekey
is the ceiling number andvalue
is the ceiling value.- Returns:
- A non-null map.
- Since:
- 0.1.0
- See Also:
-
getCaCertificate
byte[] getCaCertificate()Returns the CA certificate retrieved from the SAM as a 384-byte byte array.- Returns:
- null if the CA certificate is not available.
- Since:
- 0.5.0
- See Also:
-
getSamParameters
SamParameters getSamParameters()Returns the SAM parameters retrieved from the SAM.- Returns:
- null if the SAM parameters are not available.
- Since:
- 0.7.0
- See Also:
-
getSystemKeyParameter
Returns the parameters of the system key for the specified key type.- Parameters:
systemKeyType
- The type of system key.- Returns:
- Null if there is no parameter available for the specified key type.
- Throws:
IllegalArgumentException
- If the provided argument is null.- Since:
- 0.2.0
- See Also:
-
getWorkKeyParameter
Returns the parameters of the work key referenced by its record number.- Parameters:
recordNumber
- The key record number (in range [1..126]).- Returns:
- Null if there is no parameter available for the specified key record number.
- Throws:
IllegalArgumentException
- If the provided record number is out of range.- Since:
- 0.7.0
- See Also:
-
getWorkKeyParameter
Returns the parameters of the work key referenced by its KIF and KVC.- Parameters:
kif
- The key KIF.kvc
- The key KVC.- Returns:
- Null if there is no parameter available for the specified KIF/KVC.
- Since:
- 0.7.0
- See Also:
-