Class InitializeConfiguration
- java.lang.Object
-
- de.cardcontact.opencard.service.smartcardhsm.InitializeConfiguration
-
public class InitializeConfiguration extends java.lang.Object
Encoder for DEVICE INITIALIZATION command data- Author:
- lew
-
-
Constructor Summary
Constructors Constructor Description InitializeConfiguration(byte[] initCode)
Create a new configuration with the given initialization code and an enabled RESET RETRY COUNTER
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]
getCData()
Get C-Data for the INITIALIZE DEVICE APDU.void
setDKEKShares(byte keyshares)
Set the number of DKEK sharesvoid
setInitializationCode(byte[] code)
Set the initialization codevoid
setInitialPIN(byte[] pin)
Set the user PIN or transport PINvoid
setPublicKeyAuthenticationParameter(byte requiredPublicKeysForAuthentication, byte numberOfPublicKeys)
Set parameter for public key authentication with n-of-m scheme, namely the values for n and mvoid
setResetRetryCounterMode(boolean enable)
Enable or disable the RESET RETRY COUNTER command.void
setRetryCounterInitial(byte retryCounter)
Set the Retry Counter Initial Value.void
setTransportPINMode(boolean enable)
Enable or disable transport PIN mode.
-
-
-
Method Detail
-
setInitializationCode
public void setInitializationCode(byte[] code)
Set the initialization code- Parameters:
code
- an 8 byte ASCII code
-
setInitialPIN
public void setInitialPIN(byte[] pin)
Set the user PIN or transport PIN- Parameters:
pin
- a 6 to 16 byte ASCII code
-
setRetryCounterInitial
public void setRetryCounterInitial(byte retryCounter)
Set the Retry Counter Initial Value. The SmartCard-HSM enforces a retry counter <= 3 for PIN length 6 The SmartCard-HSM enforces a retry counter <= 5 for PIN length 7 The SmartCard-HSM enforces a retry counter <= 10 for PIN length larger than 7- Parameters:
retryCounter
- in the range from 1 to 10
-
setDKEKShares
public void setDKEKShares(byte keyshares)
Set the number of DKEK shares- Parameters:
keyshares
- number of DKEK shares
-
setPublicKeyAuthenticationParameter
public void setPublicKeyAuthenticationParameter(byte requiredPublicKeysForAuthentication, byte numberOfPublicKeys)
Set parameter for public key authentication with n-of-m scheme, namely the values for n and m- Parameters:
requiredPublicKeysForAuthentication
- number of key that must be authenticated for accessnumberOfPublicKeys
- to register
-
setResetRetryCounterMode
public void setResetRetryCounterMode(boolean enable)
Enable or disable the RESET RETRY COUNTER command. On default the RESET RETRY COUNTER is enabled.- Parameters:
enable
- true (default) to allow RESET RETRY COUNTER command, false otherwise.
-
setTransportPINMode
public void setTransportPINMode(boolean enable)
Enable or disable transport PIN mode. On default transport PIN mode is disabled.- Parameters:
enable
- true (non-default) to set user PIN to transport state.
-
getCData
public byte[] getCData()
Get C-Data for the INITIALIZE DEVICE APDU.- Returns:
- the C-Data
-
-