public class KeyInfoTool extends KeyRetriever
XSKeyInfo, KeyInfoData, KeyRetriever| Constructor and Description | 
|---|
KeyInfoTool()
Creates a new  
KeyInfoTool instance. | 
| Modifier and Type | Method and Description | 
|---|---|
java.security.cert.X509Certificate | 
retrieveCertificate(KeyInfoData keyInfo)
Extracts the certificate from the given  
KeyInfoData. | 
java.security.PublicKey | 
retrievePublicKey(KeyInfoData keyInfo)
Extracts the public key from the given  
KeyInfoData. | 
javax.crypto.SecretKey | 
retrieveSymmetricKey(KeyInfoData keyInfo)
Extracts the symmetric key from the given  
KeyInfoData. | 
addKeyRetriever, getAuthenticator, getCertificate, getCertificate, getPrivateKey, getPrivateKey, getPublicKey, getPublicKey, getSymmetricKey, getSymmetricKey, removeKeyRetriever, retrieveCertificate, retrievePrivateKey, retrievePrivateKey, retrievePublicKey, retrieveSymmetricKey, setAuthenticator, setCertificateValidator, validateCertificate, validateCertificate, validateCertificatepublic java.security.PublicKey retrievePublicKey(KeyInfoData keyInfo) throws KeyRetrievalException
KeyInfoData.retrievePublicKey in class KeyRetrieverkeyInfo - A KeyInfoData instance.PublicKey if keyInfo is a KeyValue or a X509Data containing a X509Certificate, otherwise returns null.StorageAuthenticationException - If an error occurs authenticating to the key source.KeyRetrievalExceptionpublic javax.crypto.SecretKey retrieveSymmetricKey(KeyInfoData keyInfo) throws KeyRetrievalException
KeyInfoData.retrieveSymmetricKey in class KeyRetrieverkeyInfo - A KeyInfoData instance.SecretKey if keyInfo is a XEEncryptedKey, otherwise returns null.StorageAuthenticationException - If an error occurs authenticating to the key source.KeyRetrievalExceptionpublic java.security.cert.X509Certificate retrieveCertificate(KeyInfoData keyInfo) throws KeyRetrievalException
KeyInfoData.retrieveCertificate in class KeyRetrieverkeyInfo - A KeyInfoData instance.X509Certificate if keyInfo is a X509Data containing a X509Certificate, otherwise returns null.StorageAuthenticationException - If an error occurs authenticating to the key source.KeyRetrievalException