com.ibm.security.smime
Class SMIME

java.lang.Object
  |
  +--com.ibm.security.smime.SMIME

public final class SMIME
extends Object

Provides helper constants and methods to the SMIME package and subpackages.


Field Summary
static String CERTIFICATE_REQUEST_FILE_NAME
          CERTIFICATE_REQUEST_FILE_NAME = "smime.p10"
static String ENVELOPED_DATA_FILE_NAME
          ENVELOPED_DATA_FILE_NAME = "smime.p7m"
static int MEDIUM_ENCRYPTION
          Specify medium strength encryption for EnvelopedData S/MIME objects.
static String SIGNED_DATA_CERTIFICATE_ONLY_FILE_NAME
          SIGNED_DATA_CERTIFICATE_ONLY_FILE_NAME = "smime.p7c"
static String SIGNED_DATA_FILE_NAME
          SIGNED_DATA_FILE_NAME = "smime.p7m"
static String SIGNED_DATA_SIGNATURE_ONLY_FILE_NAME
          SIGNED_DATA_SIGNATURE_ONLY_FILE_NAME = "smime.p7s"
static String SMIME_GENERIC_FILE_NAME
          SMIME_GENERIC_FILE_NAME = "smime.dat"
static String SMIME_PROTOCOL_PKCS7_SIGNATURE
          SMIME_PROTOCOL_PKCS7_SIGNATURE = "pkcs7-signature"
static String SMIME_TYPE_CERTS_ONLY
          SMIME_TYPE_CERTS_ONLY = "certs-only"
static String SMIME_TYPE_ENVELOPED_DATA
          SMIME_TYPE_ENVELOPED_DATA = "enveloped-data"
static String SMIME_TYPE_SIGNED_DATA
          SMIME_TYPE_SIGNED_DATA = "signed-data"
static int STRONG_ENCRYPTION
          Specify strong strength encryption for EnvelopedData S/MIME objects.
static int WEAK_ENCRYPTION
          Specify weak strength encryption for EnvelopedData S/MIME objects.
 
Constructor Summary
SMIME()
           
 
Method Summary
static String getEncryptionAlgorithm(int encryptionStrength)
          Retrieves the default encryption algorithm String for the specified encryption strength.
static int getEncryptionKeySize(int encryptionStrength)
          Retrieves the default encryption keysize for the specified encryption strength.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ENVELOPED_DATA_FILE_NAME

public static final String ENVELOPED_DATA_FILE_NAME
ENVELOPED_DATA_FILE_NAME = "smime.p7m"

SIGNED_DATA_FILE_NAME

public static final String SIGNED_DATA_FILE_NAME
SIGNED_DATA_FILE_NAME = "smime.p7m"

SIGNED_DATA_SIGNATURE_ONLY_FILE_NAME

public static final String SIGNED_DATA_SIGNATURE_ONLY_FILE_NAME
SIGNED_DATA_SIGNATURE_ONLY_FILE_NAME = "smime.p7s"

SIGNED_DATA_CERTIFICATE_ONLY_FILE_NAME

public static final String SIGNED_DATA_CERTIFICATE_ONLY_FILE_NAME
SIGNED_DATA_CERTIFICATE_ONLY_FILE_NAME = "smime.p7c"

SMIME_GENERIC_FILE_NAME

public static final String SMIME_GENERIC_FILE_NAME
SMIME_GENERIC_FILE_NAME = "smime.dat"

CERTIFICATE_REQUEST_FILE_NAME

public static final String CERTIFICATE_REQUEST_FILE_NAME
CERTIFICATE_REQUEST_FILE_NAME = "smime.p10"

SMIME_TYPE_SIGNED_DATA

public static final String SMIME_TYPE_SIGNED_DATA
SMIME_TYPE_SIGNED_DATA = "signed-data"

SMIME_TYPE_CERTS_ONLY

public static final String SMIME_TYPE_CERTS_ONLY
SMIME_TYPE_CERTS_ONLY = "certs-only"

SMIME_TYPE_ENVELOPED_DATA

public static final String SMIME_TYPE_ENVELOPED_DATA
SMIME_TYPE_ENVELOPED_DATA = "enveloped-data"

SMIME_PROTOCOL_PKCS7_SIGNATURE

public static final String SMIME_PROTOCOL_PKCS7_SIGNATURE
SMIME_PROTOCOL_PKCS7_SIGNATURE = "pkcs7-signature"

WEAK_ENCRYPTION

public static final int WEAK_ENCRYPTION
Specify weak strength encryption for EnvelopedData S/MIME objects. Weak strength encryption uses the RC2/CBC algorithm with a key length of 40.

MEDIUM_ENCRYPTION

public static final int MEDIUM_ENCRYPTION
Specify medium strength encryption for EnvelopedData S/MIME objects. Medium strength encryption uses the DES/CBC algorithm with a key length of 56.

STRONG_ENCRYPTION

public static final int STRONG_ENCRYPTION
Specify strong strength encryption for EnvelopedData S/MIME objects. Medium strength encryption uses the DESede/CBC algorithm with a key length of 168.
Constructor Detail

SMIME

public SMIME()
Method Detail

getEncryptionAlgorithm

public static String getEncryptionAlgorithm(int encryptionStrength)
                                     throws NoSuchAlgorithmException
Retrieves the default encryption algorithm String for the specified encryption strength.
Parameters:
encryptionStrength - specified by WEAK_ENCRYPTION, MEDIUM_ENCRYPTION, and STRONG_ENCRYPTION
Throws:
NoSuchAlgorithmException - on invalid algorithm error.

getEncryptionKeySize

public static int getEncryptionKeySize(int encryptionStrength)
Retrieves the default encryption keysize for the specified encryption strength.
Parameters:
encryptionStrength - specified by WEAK_ENCRYPTION, MEDIUM_ENCRYPTION, and STRONG_ENCRYPTION