Package org.cryptacular.bean
Class ResourceBasedPrivateKeyFactoryBean
java.lang.Object
org.cryptacular.bean.ResourceBasedPrivateKeyFactoryBean
- All Implemented Interfaces:
FactoryBean<PrivateKey>
Factory for reading a private from a
Resource containing data in any of the formats supported by KeyPairUtil.readPrivateKey(java.io.InputStream, char[]).- Author:
- Middleware Services
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionResourceBasedPrivateKeyFactoryBean(Resource resource) Creates a new instance capable of reading an unencrypted private key.ResourceBasedPrivateKeyFactoryBean(Resource resource, String decryptionPassword) Creates a new instance of reading an encrypted private key. -
Method Summary
-
Constructor Details
-
ResourceBasedPrivateKeyFactoryBean
Creates a new instance capable of reading an unencrypted private key.- Parameters:
resource- Resource containing encoded key data.
-
ResourceBasedPrivateKeyFactoryBean
Creates a new instance of reading an encrypted private key.- Parameters:
resource- Resource containing encoded key data.decryptionPassword- Password-based encryption key.
-
-
Method Details
-
getResource
- Returns:
- Resource containing key data.
-
newInstance
- Specified by:
newInstancein interfaceFactoryBean<PrivateKey>- Returns:
- New instance of the type handled by this factory.
- Throws:
EncodingExceptionStreamException
-