public abstract class KeyStoreWrapper
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected org.apache.commons.logging.Log |
log |
| Modifier | Constructor and Description |
|---|---|
protected |
KeyStoreWrapper() |
| Modifier and Type | Method and Description |
|---|---|
protected java.security.Key |
getDefaultPrivateKey()
Returns the key based on default alias or password
|
protected java.security.Key |
getKey(java.lang.String alias,
java.lang.String keyPassword)
Returns the key based on provided alias and key password
|
protected java.security.KeyStore |
getKeyStore()
Returns KeyStore Information
|
protected java.security.Key |
getPrivateKey(java.lang.String alias)
Returns the key based on default key password
|
java.security.PublicKey |
getPublicKey()
Returns the public key based on initialization data
|
java.security.PublicKey |
getPublicKey(java.lang.String alias)
Returns the public key for the given alias
|
protected java.security.Key |
getPublicKeyFromCertificate(java.lang.String alias)
Returns the key based on certificate of the owner to who given alias belong
|
javax.crypto.SecretKey |
getSecretKey()
Returns the secret key based on initialization data
|
javax.crypto.SecretKey |
getSecretKey(java.lang.String alias,
java.lang.String keyPassword)
Returns the secret key
|
protected void |
init(KeyStoreInformation information,
java.lang.String keyPassword)
Initialize the KeyStore wrapper based on provided KeyStoreInformation and passwords
|
protected void init(KeyStoreInformation information, java.lang.String keyPassword)
information - The object that has encapsulated all information for a
keyStore excepts passwordskeyPassword - Specifies the password of the key within the keyStoreprotected java.security.Key getKey(java.lang.String alias,
java.lang.String keyPassword)
alias - The alias of the certificate in the specified keyStorekeyPassword - Password for key within the KeyStroreprotected java.security.Key getPublicKeyFromCertificate(java.lang.String alias)
alias - The alias of the certificate in the specified keyStoreprotected java.security.Key getDefaultPrivateKey()
protected java.security.Key getPrivateKey(java.lang.String alias)
alias - The aliaspublic java.security.PublicKey getPublicKey(java.lang.String alias)
alias - The alias of the certificate in the specified keyStorepublic java.security.PublicKey getPublicKey()
protected java.security.KeyStore getKeyStore()
public javax.crypto.SecretKey getSecretKey(java.lang.String alias,
java.lang.String keyPassword)
alias - The alias of the certificate in the specified keyStorekeyPassword - Password to access secret keypublic javax.crypto.SecretKey getSecretKey()
Copyright © 2005-2022 Apache Software Foundation. All Rights Reserved.