|
Oracle Fusion Middleware CMS Java API Reference for Oracle Security Developer Tools 11g Release 1 (11.1.1) E10667-05 |
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object
oracle.security.crypto.cms.CMSUtils
public class CMSUtils
Utility functions for users of this package.
| Constructor Summary | |
|---|---|
CMSUtils() |
|
| Method Summary | |
|---|---|
static java.lang.String |
addPadding(java.lang.String algoName) |
static boolean |
checkKeyParity(javax.crypto.SecretKey key, int parity)Check the least significant bit of each key byte for the parity indicated -- 1 for odd parity or 0 for even parity. |
static oracle.security.crypto.cert.X509 |
convertX509(java.security.cert.X509Certificate cert)Converts an X509Certificate object to an X509 object |
static byte[] |
generateKeyID(java.security.PublicKey key) |
static byte[] |
generateSPKI160(java.security.cert.X509Certificate cert)Generates a 160 bit Subject Key Identifier as per RFC-2459. |
static byte[] |
generateSPKI64(java.security.cert.X509Certificate cert)Generates a 64 bit Subject Key Identifier as per RFC-2459. |
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 java.lang.String |
getSigAlgName(java.lang.String encId, java.lang.String digId) |
static void |
setKeyParity(javax.crypto.SecretKey key, int parity)Set the least significant bit of each key byte so that it has the parity indicated -- 1 for odd parity or 0 for even parity. |
static java.util.Vector |
toJCECertVector(java.util.Vector certs) |
static java.security.PublicKey |
toJCEPublicKey(oracle.security.crypto.core.PublicKey phaoskey) |
static java.security.cert.X509Certificate |
toX509JCECertificate(oracle.security.crypto.cert.X509 cert) |
static java.util.Vector |
toX509Vector(java.util.Vector certs)Converts a Vector of X509Certificate Objects to a Vector of X509 objects |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CMSUtils()
| Method Detail |
|---|
public static byte[] generateSPKI64(java.security.cert.X509Certificate cert)
throws java.security.NoSuchAlgorithmException
cert - The public key X509 certificate.java.security.NoSuchAlgorithmException
public static byte[] generateSPKI160(java.security.cert.X509Certificate cert)
throws java.security.NoSuchAlgorithmException
cert - The public key X509 certificate.java.security.NoSuchAlgorithmException
public static oracle.security.crypto.core.AlgorithmIdentifier getAlgoID(java.lang.String name)
throws java.security.NoSuchAlgorithmException
name - Name of the algorithmjava.security.NoSuchAlgorithmException
public static java.lang.String getAlgoName(oracle.security.crypto.core.AlgorithmIdentifier oid)
throws java.security.NoSuchAlgorithmException
oid - Algorithmidentifier for which algorithm name is requiredjava.security.NoSuchAlgorithmException
public static java.lang.String getAlgoName(oracle.security.crypto.core.AlgorithmIdentifier oid,
boolean removeMode)
throws java.security.NoSuchAlgorithmException
oid - Algorithmidentifier for which algorithm name is requiredboolean - is set to true in case the mode in the algoname needs to be removed for instance while creating an instance of KeyGeneratorjava.security.NoSuchAlgorithmException
public static byte[] generateKeyID(java.security.PublicKey key)
throws java.security.NoSuchAlgorithmException
java.security.NoSuchAlgorithmException
public static void setKeyParity(javax.crypto.SecretKey key,
int parity)
1 for odd parity or 0 for even parity. This applies primarily to DES and DES-EDE keys.key - The key for which parity is to be set.parity - 1 for odd parity or 0 for even parity.
public static boolean checkKeyParity(javax.crypto.SecretKey key,
int parity)
1 for odd parity or 0 for even parity. This applies primarily to DES and DES-EDE keys.key - The key for which parity is to be set.parity - 1 for odd parity or 0 for even parity.true if each byte has the specified parity otherwise false
public static java.lang.String getSigAlgName(java.lang.String encId,
java.lang.String digId)
public static java.lang.String addPadding(java.lang.String algoName)
algoName -
public static oracle.security.crypto.cert.X509 convertX509(java.security.cert.X509Certificate cert)
throws java.security.cert.CertificateEncodingException
cert - X509Certificate objectjava.security.cert.CertificateEncodingException
public static java.util.Vector toX509Vector(java.util.Vector certs)
throws java.security.cert.CertificateEncodingException
java.security.cert.CertificateEncodingException
public static java.util.Vector toJCECertVector(java.util.Vector certs)
throws java.security.cert.CertificateException
java.security.cert.CertificateException
public static java.security.cert.X509Certificate toX509JCECertificate(oracle.security.crypto.cert.X509 cert)
throws java.security.cert.CertificateException
java.security.cert.CertificateException
public static java.security.PublicKey toJCEPublicKey(oracle.security.crypto.core.PublicKey phaoskey)
throws java.security.NoSuchAlgorithmException,
java.security.spec.InvalidKeySpecException
java.security.NoSuchAlgorithmExceptionjava.security.spec.InvalidKeySpecException
|
Oracle Fusion Middleware CMS Java API Reference for Oracle Security Developer Tools 11g Release 1 (11.1.1) E10667-05 |
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||