Class 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 shares
      void setInitializationCode​(byte[] code)
      Set the initialization code
      void setInitialPIN​(byte[] pin)
      Set the user PIN or transport PIN
      void setPublicKeyAuthenticationParameter​(byte requiredPublicKeysForAuthentication, byte numberOfPublicKeys)
      Set parameter for public key authentication with n-of-m scheme, namely the values for n and m
      void 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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • InitializeConfiguration

        public InitializeConfiguration​(byte[] initCode)
        Create a new configuration with the given initialization code and an enabled RESET RETRY COUNTER
        Parameters:
        initCode - an 8 byte ASCII code
    • 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 access
        numberOfPublicKeys - 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