public class ResourceBasedPrivateKeyFactoryBean extends Object implements FactoryBean<PrivateKey>
Resource
containing data in any
of the formats supported by KeyPairUtil.readPrivateKey(java.io.InputStream, char[])
.KeyPairUtil.readPrivateKey(java.io.InputStream, char[])
,
KeyPairUtil.readPrivateKey(java.io.InputStream)
Constructor and Description |
---|
ResourceBasedPrivateKeyFactoryBean()
Creates a new instance.
|
ResourceBasedPrivateKeyFactoryBean(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.
|
Modifier and Type | Method and Description |
---|---|
Resource |
getResource() |
PrivateKey |
newInstance() |
void |
setPassword(String decryptionPassword)
Sets the password-based key used to decrypt an encrypted private key.
|
void |
setResource(Resource resource)
Sets the resource containing key data.
|
public ResourceBasedPrivateKeyFactoryBean()
public ResourceBasedPrivateKeyFactoryBean(Resource resource)
resource
- Resource containing encoded key data.public Resource getResource()
public void setResource(Resource resource)
resource
- Resource containing key bytes.public void setPassword(String decryptionPassword)
decryptionPassword
- Password-based encryption key.public PrivateKey newInstance()
newInstance
in interface FactoryBean<PrivateKey>
Copyright © 2016 JBoss by Red Hat. All rights reserved.