Package com.caplin.keymaster
Class HardwareKeyStoreKeyMasterConfiguration
- java.lang.Object
-
- com.caplin.keymaster.HardwareKeyStoreKeyMasterConfiguration
-
- All Implemented Interfaces:
IKeyMasterConfiguration
public class HardwareKeyStoreKeyMasterConfiguration extends java.lang.Object implements IKeyMasterConfiguration
TheHardwareKeyStoreKeyMasterConfiguration
class creates a configuration for KeyMaster using a private key stored in a hardware keystore.
-
-
Constructor Summary
Constructors Constructor Description 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)
Initializes a new instance of theHardwareKeyStoreKeyMasterConfiguration
class that uses the private key in the supplied hardware keystore.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)
Initializes a new instance of theHardwareKeyStoreKeyMasterConfiguration
class that uses the private key in the supplied hardware keystore.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description KeyMasterHashingAlgorithm
getHashingAlgorithm()
Gets the hashing algorithm that is used to generate the KeyMaster token.java.security.PrivateKey
getPrivateKey()
Gets a private key object.java.lang.String
getSecurityProviderName()
The name of the Java Security provider to be used to generate the token.java.lang.String
toString()
-
-
-
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 theHardwareKeyStoreKeyMasterConfiguration
class that uses the private key in the supplied hardware keystore.- Parameters:
keystoreFilename
- the filename ofkeystoreType
- the keystore typekeystorePassPhrase
- the keystore pass phrasekeystoreKey
- the keystore keykeystoreKeyPassPhrase
- the keystore key pass phrasehashingAlgorithm
- 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 theHardwareKeyStoreKeyMasterConfiguration
class that uses the private key in the supplied hardware keystore.- Parameters:
keystoreInputStream
- the input stream with the key storekeystoreType
- the keystore typekeystorePassPhrase
- the keystore pass phrasekeystoreKey
- the keystore keykeystoreKeyPassPhrase
- the keystore key pass phrasehashingAlgorithm
- 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 interfaceIKeyMasterConfiguration
- Returns:
- The private key.
-
getHashingAlgorithm
public KeyMasterHashingAlgorithm getHashingAlgorithm()
Description copied from interface:IKeyMasterConfiguration
Gets the hashing algorithm that is used to generate the KeyMaster token.- Specified by:
getHashingAlgorithm
in interfaceIKeyMasterConfiguration
- Returns:
- The hashing algorithm.
-
getSecurityProviderName
public java.lang.String getSecurityProviderName()
The name of the Java Security provider to be used to generate the token.- Specified by:
getSecurityProviderName
in interfaceIKeyMasterConfiguration
- Returns:
- The name of the security provider.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-