Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Object
org.bouncycastle.cms.CMSEnvelopedDataGenerator
public class CMSEnvelopedDataGenerator
extends java.lang.Object
CMSEnvelopedDataGenerator fact = new CMSEnvelopedDataGenerator(); fact.addKeyTransRecipient(cert); CMSEnvelopedData data = fact.generate(content, algorithm, "BC");
Field Summary | |
static String | |
static String | |
static String | |
static String | |
static String | |
static String | |
static String |
Constructor Summary | |
|
Method Summary | |
void |
|
void |
|
void |
|
CMSEnvelopedData |
|
CMSEnvelopedData |
|
public static final String AES128_CBC
public static final String AES192_CBC
public static final String AES256_CBC
public static final String CAST5_CBC
public static final String DES_EDE3_CBC
public static final String IDEA_CBC
public static final String RC2_CBC
public void addKEKRecipient(SecretKey key, byte[] keyIdentifier)
add a KEK recipient.
public void addKeyTransRecipient(PublicKey key, byte[] subKeyId) throws IllegalArgumentException
add a recipient
- Parameters:
key
- the public key used by the recipientsubKeyId
- the identifier for the recipient's public key
public void addKeyTransRecipient(X509Certificate cert) throws IllegalArgumentException
add a recipient.
public CMSEnvelopedData generate(CMSProcessable content, String encryptionOID, String provider) throws NoSuchAlgorithmException, NoSuchProviderException, CMSException
generate an enveloped object that contains an CMS Enveloped Data object using the given provider.
public CMSEnvelopedData generate(CMSProcessable content, String encryptionOID, int keySize, String provider) throws NoSuchAlgorithmException, NoSuchProviderException, CMSException
generate an enveloped object that contains an CMS Enveloped Data object using the given provider.