Package org.cryptacular.bean
Class PemBasedPrivateKeyFactoryBean
java.lang.Object
org.cryptacular.bean.PemBasedPrivateKeyFactoryBean
- All Implemented Interfaces:
FactoryBean<PrivateKey>
Factory for creating a public key from a PEM-encoded private key in any format supported by
KeyPairUtil.decodePrivateKey(byte[]). Note that this component does not support encrypted private keys; see ResourceBasedPrivateKeyFactoryBean for encryption support.- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionPemBasedPrivateKeyFactoryBean(String pemEncodedKey) Creates a new PEM based private key factory bean. -
Method Summary
-
Field Details
-
encodedKey
PEM-encoded public key data.
-
-
Constructor Details
-
PemBasedPrivateKeyFactoryBean
Creates a new PEM based private key factory bean.- Parameters:
pemEncodedKey- PEM-encoded private key data.
-
-
Method Details
-
getEncodedKey
- Returns:
- PEM-encoded private key data.
-
newInstance
- Specified by:
newInstancein interfaceFactoryBean<PrivateKey>- Returns:
- New instance of the type handled by this factory.
- Throws:
EncodingException
-