kz.gamma.cms
Class CMSEnvelopedDataGenerator

java.lang.Object
  extended by kz.gamma.cms.CMSEnvelopedGenerator
      extended by kz.gamma.cms.CMSEnvelopedDataGenerator

public class CMSEnvelopedDataGenerator
extends CMSEnvelopedGenerator

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, GammaTechProvider.PROVIDER_NAME);
 


Nested Class Summary
 
Nested classes/interfaces inherited from class kz.gamma.cms.CMSEnvelopedGenerator
CMSEnvelopedGenerator.RecipientInf
 
Field Summary
 
Fields inherited from class kz.gamma.cms.CMSEnvelopedGenerator
CAMELLIA128_CBC, CAMELLIA128_WRAP, CAMELLIA192_CBC, CAMELLIA192_WRAP, CAMELLIA256_CBC, CAMELLIA256_WRAP, CAST5_CBC, DES_EDE3_CBC, DES_EDE3_WRAP, ECDH_SHA1KDF, IDEA_CBC, rand, RC2_CBC, recipientInfs, SEED_CBC, SEED_WRAP
 
Constructor Summary
CMSEnvelopedDataGenerator()
          base constructor
 
Method Summary
 CMSEnvelopedData generate(CMSProcessable content, java.lang.String encryptionOID, int keySize, java.lang.String provider)
          generate an enveloped object that contains an CMS Enveloped Data object using the given provider.
private  CMSEnvelopedData generate(CMSProcessable content, java.lang.String encryptionOID, javax.crypto.KeyGenerator keyGen, java.lang.String provider)
          generate an enveloped object that contains an CMS Enveloped Data object using the given provider and the passed in key generator.
 CMSEnvelopedData generate(CMSProcessable content, java.lang.String encryptionOID, java.lang.String provider)
          generate an enveloped object that contains an CMS Enveloped Data object using the given provider.
 
Methods inherited from class kz.gamma.cms.CMSEnvelopedGenerator
addKEKRecipient, addKeyAgreementRecipient, addKeyTransRecipient, addKeyTransRecipient, addPasswordRecipient, generateParameters, getAlgorithmIdentifier
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CMSEnvelopedDataGenerator

public CMSEnvelopedDataGenerator()
base constructor

Method Detail

generate

private CMSEnvelopedData generate(CMSProcessable content,
                                  java.lang.String encryptionOID,
                                  javax.crypto.KeyGenerator keyGen,
                                  java.lang.String provider)
                           throws java.security.NoSuchAlgorithmException,
                                  java.security.NoSuchProviderException,
                                  CMSException
generate an enveloped object that contains an CMS Enveloped Data object using the given provider and the passed in key generator.

Throws:
java.security.NoSuchAlgorithmException
java.security.NoSuchProviderException
CMSException

generate

public CMSEnvelopedData generate(CMSProcessable content,
                                 java.lang.String encryptionOID,
                                 java.lang.String provider)
                          throws java.security.NoSuchAlgorithmException,
                                 java.security.NoSuchProviderException,
                                 CMSException
generate an enveloped object that contains an CMS Enveloped Data object using the given provider.

Throws:
java.security.NoSuchAlgorithmException
java.security.NoSuchProviderException
CMSException

generate

public CMSEnvelopedData generate(CMSProcessable content,
                                 java.lang.String encryptionOID,
                                 int keySize,
                                 java.lang.String provider)
                          throws java.security.NoSuchAlgorithmException,
                                 java.security.NoSuchProviderException,
                                 CMSException
generate an enveloped object that contains an CMS Enveloped Data object using the given provider.

Throws:
java.security.NoSuchAlgorithmException
java.security.NoSuchProviderException
CMSException


Copyright © 1998-2014 Gamma Technologies. All Rights Reserved.