Oracle Security Developer Tools XML Security Java API Reference
10g Release 3 (10.1.4.0.1)

B28178-01


oracle.security.xmlsec.keys.retrieval
Class KeyInfoTool

java.lang.Object
  extended byoracle.security.xmlsec.keys.retrieval.KeyRetriever
      extended byoracle.security.xmlsec.keys.retrieval.KeyInfoTool


public class KeyInfoTool
extends KeyRetriever

Utility for extracting keys and certificates from a KeyInfo.

Since:
2.0
See Also:
XSKeyInfo, KeyInfoData, KeyRetriever

Constructor Summary
KeyInfoTool()
          Creates a new KeyInfoTool instance.

 

Method Summary
 oracle.security.crypto.cert.X509 retrieveCertificate(KeyInfoData keyInfo)
          Extracts the certificate from the given KeyInfoData.
 oracle.security.crypto.core.PublicKey retrievePublicKey(KeyInfoData keyInfo)
          Extracts the public key from the given KeyInfoData.
 oracle.security.crypto.core.SymmetricKey retrieveSymmetricKey(KeyInfoData keyInfo)
          Extracts the symmetric key from the given KeyInfoData.

 

Methods inherited from class oracle.security.xmlsec.keys.retrieval.KeyRetriever
addKeyRetriever, getAuthenticator, getCertificate, getCertificate, getPrivateKey, getPrivateKey, getPublicKey, getPublicKey, getSymmetricKey, getSymmetricKey, retrieveCertificate, retrievePrivateKey, retrievePrivateKey, retrievePublicKey, retrieveSymmetricKey, setAuthenticator

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Constructor Detail

KeyInfoTool

public KeyInfoTool()
Creates a new KeyInfoTool instance.

Method Detail

retrievePublicKey

public oracle.security.crypto.core.PublicKey retrievePublicKey(KeyInfoData keyInfo)
                                                        throws KeyRetrievalException
Extracts the public key from the given KeyInfoData.
Overrides:
retrievePublicKey in class KeyRetriever
Parameters:
keyInfo - A KeyInfoData instance.
Returns:
A PublicKey if keyInfo is a KeyValue or a X509Data containing a X509Certificate, otherwise returns null.
Throws:
KeyRetrievalException

retrieveSymmetricKey

public oracle.security.crypto.core.SymmetricKey retrieveSymmetricKey(KeyInfoData keyInfo)
                                                              throws KeyRetrievalException
Extracts the symmetric key from the given KeyInfoData.
Overrides:
retrieveSymmetricKey in class KeyRetriever
Parameters:
keyInfo - A KeyInfoData instance.
Returns:
A SymmetricKey if keyInfo is a XEEncryptedKey, otherwise returns null.
Throws:
KeyRetrievalException

retrieveCertificate

public oracle.security.crypto.cert.X509 retrieveCertificate(KeyInfoData keyInfo)
                                                     throws KeyRetrievalException
Extracts the certificate from the given KeyInfoData.
Overrides:
retrieveCertificate in class KeyRetriever
Parameters:
keyInfo - A KeyInfoData instance.
Returns:
A X509 if keyInfo is a X509Data containing a X509Certificate, otherwise returns null.
Throws:
KeyRetrievalException

Oracle Security Developer Tools XML Security Java API Reference
10g Release 3 (10.1.4.0.1)

B28178-01


Copyright © 2005 ,2006 , Oracle. All rights reserved.