Skip navigation links

Oracle Security Developer Tools PKI SDK CMP Java API Reference
11g (11.1.1)

E10666-02


oracle.security.crypto.cmp
Class CMPUtils

java.lang.Object
  extended by oracle.security.crypto.cmp.CMPUtils


public class CMPUtils
extends java.lang.Object

Utility functions for users of this package.


Field Summary
static java.lang.String DEFAULT_DSA_Signature_Algo
           
static java.lang.String DEFAULT_RandomGenerator_ALGO
           
static java.lang.String DEFAULT_RSA_Signature_Algo
           
static java.lang.String HASH_ALG_MD2
           
static java.lang.String HASH_ALG_MD5
           
static java.lang.String HASH_ALG_SHA_1
           

 

Constructor Summary
CMPUtils()
           

 

Method Summary
static java.lang.String addPadding(java.lang.String algoName)
           
static oracle.security.crypto.cert.X509 convertX509(java.security.cert.X509Certificate cert)
          Converts an X509Certificate object to an X509 object
static oracle.security.crypto.core.AlgorithmIdentifier getAlgoID(java.lang.String name)
          Algoname to algoId mapping
static java.lang.String getAlgoName(oracle.security.crypto.core.AlgorithmIdentifier oid)
          Algoid to algoname mapping
static java.lang.String getAlgoName(oracle.security.crypto.core.AlgorithmIdentifier oid, boolean removeMode)
          Algoid to algoname mapping
static oracle.security.crypto.cert.X509ExtensionSet getExtensionSet(java.security.cert.X509Certificate cert)
          Returns a list of Extensions associated with an X509Certificate
static java.security.cert.X509Certificate toJCECertificate(oracle.security.crypto.cert.X509 cert)
           
static java.security.PublicKey toJCEPublicKey(oracle.security.crypto.core.PublicKey orakey)
           
static java.security.interfaces.RSAPrivateKey toJCERSAPrivateKey(oracle.security.crypto.core.RSAPrivateKey oraKey)
           
static oracle.security.crypto.core.KeyPair toPhaosKeyPair(java.security.KeyPair kp)
           
static oracle.security.crypto.core.PrivateKey toPhaosPrivateKey(java.security.PrivateKey privateKey)
           
static oracle.security.crypto.core.PublicKey toPhaosPublicKey(java.security.PublicKey pubkey)
           
static oracle.security.crypto.core.RSAPrivateKey toPhaosRSAPrivateKey(java.security.interfaces.RSAPrivateKey privKey)
           

 

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

 

Field Detail

DEFAULT_RandomGenerator_ALGO

public static final java.lang.String DEFAULT_RandomGenerator_ALGO
See Also:
Constant Field Values

DEFAULT_RSA_Signature_Algo

public static final java.lang.String DEFAULT_RSA_Signature_Algo
See Also:
Constant Field Values

DEFAULT_DSA_Signature_Algo

public static final java.lang.String DEFAULT_DSA_Signature_Algo
See Also:
Constant Field Values

HASH_ALG_MD5

public static final java.lang.String HASH_ALG_MD5
See Also:
Constant Field Values

HASH_ALG_MD2

public static final java.lang.String HASH_ALG_MD2
See Also:
Constant Field Values

HASH_ALG_SHA_1

public static final java.lang.String HASH_ALG_SHA_1
See Also:
Constant Field Values

Constructor Detail

CMPUtils

public CMPUtils()

Method Detail

getAlgoID

public static oracle.security.crypto.core.AlgorithmIdentifier getAlgoID(java.lang.String name)
                                                                 throws java.security.NoSuchAlgorithmException
Algoname to algoId mapping
Parameters:
name - Name of the algorithm
Returns:
AlgorithmIdentifier corresponding to the name of the algorithm
Throws:
java.security.NoSuchAlgorithmException

getAlgoName

public static java.lang.String getAlgoName(oracle.security.crypto.core.AlgorithmIdentifier oid)
                                    throws java.security.NoSuchAlgorithmException
Algoid to algoname mapping
Parameters:
oid - Algorithmidentifier for which algorithm name is required
Returns:
The algorithm name corresponding to the algoid
Throws:
java.security.NoSuchAlgorithmException

getAlgoName

public static java.lang.String getAlgoName(oracle.security.crypto.core.AlgorithmIdentifier oid,
                                           boolean removeMode)
                                    throws java.security.NoSuchAlgorithmException
Algoid to algoname mapping
Parameters:
oid - Algorithmidentifier for which algorithm name is required
removeMode - boolean - if true the mode details are removed from the algo name
Returns:
The algorithm name corresponding to the algoid
Throws:
java.security.NoSuchAlgorithmException

convertX509

public static oracle.security.crypto.cert.X509 convertX509(java.security.cert.X509Certificate cert)
                                                    throws java.security.cert.CertificateEncodingException
Converts an X509Certificate object to an X509 object
Parameters:
cert - X509Certificate object
Returns:
X509 object
Throws:
java.security.cert.CertificateEncodingException

toJCECertificate

public static java.security.cert.X509Certificate toJCECertificate(oracle.security.crypto.cert.X509 cert)
                                                           throws java.security.cert.CertificateException
Throws:
java.security.cert.CertificateException

getExtensionSet

public static oracle.security.crypto.cert.X509ExtensionSet getExtensionSet(java.security.cert.X509Certificate cert)
                                                                    throws java.io.IOException
Returns a list of Extensions associated with an X509Certificate
Parameters:
cert - java.security.X509Certificate
Returns:
X509Extensionset - set of extensions associated with the Certificate
Throws:
java.io.IOException

toPhaosPublicKey

public static oracle.security.crypto.core.PublicKey toPhaosPublicKey(java.security.PublicKey pubkey)
                                                              throws java.security.InvalidKeyException
Throws:
java.security.InvalidKeyException

toJCEPublicKey

public static java.security.PublicKey toJCEPublicKey(oracle.security.crypto.core.PublicKey orakey)
                                              throws java.security.NoSuchAlgorithmException
Throws:
java.security.NoSuchAlgorithmException

toPhaosRSAPrivateKey

public static oracle.security.crypto.core.RSAPrivateKey toPhaosRSAPrivateKey(java.security.interfaces.RSAPrivateKey privKey)

toJCERSAPrivateKey

public static java.security.interfaces.RSAPrivateKey toJCERSAPrivateKey(oracle.security.crypto.core.RSAPrivateKey oraKey)
                                                                 throws java.security.NoSuchAlgorithmException,
                                                                        java.security.spec.InvalidKeySpecException
Throws:
java.security.NoSuchAlgorithmException
java.security.spec.InvalidKeySpecException

toPhaosPrivateKey

public static oracle.security.crypto.core.PrivateKey toPhaosPrivateKey(java.security.PrivateKey privateKey)
                                                                throws java.security.InvalidKeyException
Throws:
java.security.InvalidKeyException

toPhaosKeyPair

public static oracle.security.crypto.core.KeyPair toPhaosKeyPair(java.security.KeyPair kp)
                                                          throws java.security.InvalidKeyException
Throws:
java.security.InvalidKeyException

addPadding

public static java.lang.String addPadding(java.lang.String algoName)
Parameters:
algoName -
Returns:
String - the name of the algorithm with the PKCS5Padding appended

Skip navigation links

Oracle Security Developer Tools PKI SDK CMP Java API Reference
11g (11.1.1)

E10666-02


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