Class HardwareKeyStoreKeyMasterConfiguration

  • All Implemented Interfaces:
    IKeyMasterConfiguration

    public class HardwareKeyStoreKeyMasterConfiguration
    extends java.lang.Object
    implements IKeyMasterConfiguration
    The HardwareKeyStoreKeyMasterConfiguration class creates a configuration for KeyMaster using a private key stored in a hardware keystore.
    • Constructor Detail

      • HardwareKeyStoreKeyMasterConfiguration

        public HardwareKeyStoreKeyMasterConfiguration​(java.lang.String keystoreFilename,
                                                      java.lang.String keystoreType,
                                                      java.lang.String keystorePassPhrase,
                                                      java.lang.String keystoreKey,
                                                      java.lang.String keystoreKeyPassPhrase,
                                                      KeyMasterHashingAlgorithm hashingAlgorithm,
                                                      java.lang.String securityProviderName)
                                               throws java.lang.Exception
        Initializes a new instance of the HardwareKeyStoreKeyMasterConfiguration class that uses the private key in the supplied hardware keystore.
        Parameters:
        keystoreFilename - the filename of
        keystoreType - the keystore type
        keystorePassPhrase - the keystore pass phrase
        keystoreKey - the keystore key
        keystoreKeyPassPhrase - the keystore key pass phrase
        hashingAlgorithm - The hashing algorithm to use.
        securityProviderName - The name of the security provider to use.
        Throws:
        java.lang.Exception - exception thrown if there is any problem initiating the hardware keystore with the provided parameters.
      • HardwareKeyStoreKeyMasterConfiguration

        public HardwareKeyStoreKeyMasterConfiguration​(java.io.InputStream keystoreInputStream,
                                                      java.lang.String keystoreType,
                                                      java.lang.String keystorePassPhrase,
                                                      java.lang.String keystoreKey,
                                                      java.lang.String keystoreKeyPassPhrase,
                                                      KeyMasterHashingAlgorithm hashingAlgorithm,
                                                      java.lang.String securityProviderName)
                                               throws java.lang.Exception
        Initializes a new instance of the HardwareKeyStoreKeyMasterConfiguration class that uses the private key in the supplied hardware keystore.
        Parameters:
        keystoreInputStream - the input stream with the key store
        keystoreType - the keystore type
        keystorePassPhrase - the keystore pass phrase
        keystoreKey - the keystore key
        keystoreKeyPassPhrase - the keystore key pass phrase
        hashingAlgorithm - The hashing algorithm to use.
        securityProviderName - The name of the security provider to use.
        Throws:
        java.lang.Exception - exception thrown if there is any problem initiating the hardware keystore with the provided parameters.
    • Method Detail

      • getPrivateKey

        public java.security.PrivateKey getPrivateKey()
        Description copied from interface: IKeyMasterConfiguration
        Gets a private key object.

        The KeyMaster token generator retrieves this property whenever it needs to generate a token.

        Specified by:
        getPrivateKey in interface IKeyMasterConfiguration
        Returns:
        The private key.
      • getSecurityProviderName

        public java.lang.String getSecurityProviderName()
        The name of the Java Security provider to be used to generate the token.
        Specified by:
        getSecurityProviderName in interface IKeyMasterConfiguration
        Returns:
        The name of the security provider.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object