com.ibm.security.pkcs9
Class PKCS9

java.lang.Object
  |
  +--com.ibm.security.pkcs9.PKCS9

public final class PKCS9
extends Object

PKCS #9 helper class. This class defines static fields and provides helper class methods for the PKCS7 and PKCS9 packages.


Field Summary
static String CHALLENGE_PASSWORD_STR
          PKCS9 Challenge Password String
static String CONTENT_TYPE_STR
          PKCS9 Content Type String
static String COUNTERSIGNATURE_STR
          PKCS9 Countersignature String
static String EMAIL_ADDRESS_STR
          PKCS9 Email Address String
static String EXTENDED_CERTIFICATE_ATTRIBUTES_STR
          PKCS9 Extended Certificate Attributes String
static String FRIENDLY_NAME_STR
          PKCS9 Friendly Name String
static String LOCAL_KEY_ID_STR
          PKCS9 Local Key Id String
static String MESSAGE_DIGEST_STR
          PKCS9 Message Digest String
static String SIGNING_TIME_STR
          PKCS9 Signing Time String
static String UNSTRUCTURED_ADDRESS_STR
          PKCS9 Unstructured Address String
static String UNSTRUCTURED_NAME_STR
          PKCS9 Unstructured Name String
 
Method Summary
static String getName(ObjectIdentifier oid)
          Return the attribute name for a given OID or null if we don't recognize the oid.
static ObjectIdentifier getObjectIdentifier(String name)
          Return the OID for a given attribute name or null if the name is not recognized.
static PKCS9DerObject getPKCS9Attribute(byte[] encoding)
           
static PKCS9DerObject getPKCS9Attribute(byte[] encoding, String provider)
           
static PKCS9DerObject getPKCS9Attribute(ObjectIdentifier oid, Object value)
           
static PKCS9DerObject getPKCS9Attribute(ObjectIdentifier oid, Object value, String provider)
           
static PKCS9DerObject getPKCS9Attribute(String name, Object value)
           
static PKCS9DerObject getPKCS9Attribute(String name, Object value, String provider)
           
static boolean isAuthenticatedData(ObjectIdentifier oid)
          Return true if the ObjectIdentifier matches the AuthenticatedData ObjectIdentifer.
static boolean isAuthenticatedData(String oidString)
          Return true if the string matches the AuthenticatedData ObjectIdentifer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EMAIL_ADDRESS_STR

public static final String EMAIL_ADDRESS_STR
PKCS9 Email Address String

UNSTRUCTURED_NAME_STR

public static final String UNSTRUCTURED_NAME_STR
PKCS9 Unstructured Name String

CONTENT_TYPE_STR

public static final String CONTENT_TYPE_STR
PKCS9 Content Type String

MESSAGE_DIGEST_STR

public static final String MESSAGE_DIGEST_STR
PKCS9 Message Digest String

SIGNING_TIME_STR

public static final String SIGNING_TIME_STR
PKCS9 Signing Time String

COUNTERSIGNATURE_STR

public static final String COUNTERSIGNATURE_STR
PKCS9 Countersignature String

CHALLENGE_PASSWORD_STR

public static final String CHALLENGE_PASSWORD_STR
PKCS9 Challenge Password String

UNSTRUCTURED_ADDRESS_STR

public static final String UNSTRUCTURED_ADDRESS_STR
PKCS9 Unstructured Address String

EXTENDED_CERTIFICATE_ATTRIBUTES_STR

public static final String EXTENDED_CERTIFICATE_ATTRIBUTES_STR
PKCS9 Extended Certificate Attributes String

FRIENDLY_NAME_STR

public static final String FRIENDLY_NAME_STR
PKCS9 Friendly Name String

LOCAL_KEY_ID_STR

public static final String LOCAL_KEY_ID_STR
PKCS9 Local Key Id String
Method Detail

getObjectIdentifier

public static ObjectIdentifier getObjectIdentifier(String name)
Return the OID for a given attribute name or null if the name is not recognized.

getName

public static String getName(ObjectIdentifier oid)
Return the attribute name for a given OID or null if we don't recognize the oid.

getPKCS9Attribute

public static PKCS9DerObject getPKCS9Attribute(ObjectIdentifier oid,
                                               Object value)

getPKCS9Attribute

public static PKCS9DerObject getPKCS9Attribute(ObjectIdentifier oid,
                                               Object value,
                                               String provider)

getPKCS9Attribute

public static PKCS9DerObject getPKCS9Attribute(String name,
                                               Object value)

getPKCS9Attribute

public static PKCS9DerObject getPKCS9Attribute(String name,
                                               Object value,
                                               String provider)

getPKCS9Attribute

public static PKCS9DerObject getPKCS9Attribute(byte[] encoding)
                                        throws IOException

getPKCS9Attribute

public static PKCS9DerObject getPKCS9Attribute(byte[] encoding,
                                               String provider)
                                        throws IOException

isAuthenticatedData

public static boolean isAuthenticatedData(String oidString)
Return true if the string matches the AuthenticatedData ObjectIdentifer.
Parameters:
oidString - Object Identifier string.
Returns:
true, if the string matches the AuthenticatedData ObjectIdentifier, false otherwise.

isAuthenticatedData

public static boolean isAuthenticatedData(ObjectIdentifier oid)
Return true if the ObjectIdentifier matches the AuthenticatedData ObjectIdentifer.
Parameters:
oid - ObjectIdentifier
Returns:
true, if the oid matches the AuthenticatedData ObjectIdentifier, false otherwise.