| java.lang.Object org.bouncycastle.cms.CMSEnvelopedGenerator
All known Subclasses: org.bouncycastle.cms.CMSEnvelopedDataStreamGenerator, org.bouncycastle.cms.CMSEnvelopedDataGenerator,
CMSEnvelopedGenerator | public class CMSEnvelopedGenerator (Code) | | General class for generating a CMS enveloped-data message.
A simple example of usage.
CMSEnvelopedDataGenerator fact = new CMSEnvelopedDataGenerator();
fact.addKeyTransRecipient(cert);
CMSEnvelopedData data = fact.generate(content, algorithm, "BC");
|
Inner Class :protected class RecipientInf | |
Method Summary | |
public void | addKEKRecipient(SecretKey key, byte[] keyIdentifier) add a KEK recipient. | public void | addKeyAgreementRecipient(String agreementAlgorithm, PrivateKey senderPrivateKey, PublicKey senderPublicKey, X509Certificate recipientCert, String cekWrapAlgorithm, String provider) Add a key agreement based recipient. | public void | addKeyTransRecipient(X509Certificate cert) add a recipient. | public void | addKeyTransRecipient(PublicKey key, byte[] subKeyId) | public void | addPasswordRecipient(CMSPBEKey pbeKey, String kekAlgorithmOid) | protected AlgorithmParameters | generateParameters(String encryptionOID, SecretKey encKey, String encProvider) | protected AlgorithmIdentifier | getAlgorithmIdentifier(String encryptionOID, AlgorithmParameters params) |
CAMELLIA128_CBC | final public static String CAMELLIA128_CBC(Code) | | |
CAMELLIA128_WRAP | final public static String CAMELLIA128_WRAP(Code) | | |
CAMELLIA192_CBC | final public static String CAMELLIA192_CBC(Code) | | |
CAMELLIA192_WRAP | final public static String CAMELLIA192_WRAP(Code) | | |
CAMELLIA256_CBC | final public static String CAMELLIA256_CBC(Code) | | |
CAMELLIA256_WRAP | final public static String CAMELLIA256_WRAP(Code) | | |
CMSEnvelopedGenerator | public CMSEnvelopedGenerator()(Code) | | base constructor
|
addKEKRecipient | public void addKEKRecipient(SecretKey key, byte[] keyIdentifier)(Code) | | add a KEK recipient.
Parameters: key - the secret key to use for wrapping Parameters: keyIdentifier - the byte string that identifies the key |
addKeyAgreementRecipient | public void addKeyAgreementRecipient(String agreementAlgorithm, PrivateKey senderPrivateKey, PublicKey senderPublicKey, X509Certificate recipientCert, String cekWrapAlgorithm, String provider) throws NoSuchProviderException, NoSuchAlgorithmException, InvalidKeyException(Code) | | Add a key agreement based recipient.
Parameters: agreementAlgorithm - key agreement algorithm to use. Parameters: senderPrivateKey - private key to initialise sender side of agreement with. Parameters: senderPublicKey - sender public key to include with message. Parameters: recipientCert - recipient's public key certificate. Parameters: cekWrapAlgorithm - OID for key wrapping algorithm to use. Parameters: provider - provider to use for the agreement calculation. exception: NoSuchProviderException - if the specified provider cannot be found exception: NoSuchAlgorithmException - if the algorithm requested cannot be found exception: InvalidKeyException - if the keys are inappropriate for the algorithm specified |
addKeyTransRecipient | public void addKeyTransRecipient(PublicKey key, byte[] subKeyId) throws IllegalArgumentException(Code) | | add a recipient
Parameters: key - the public key used by the recipient Parameters: subKeyId - the identifier for the recipient's public key exception: IllegalArgumentException - if there is a problem with the key |
|
|