Bouncy Castle Cryptography 1.46

org.bouncycastle.cms
Class CMSAuthenticatedGenerator

java.lang.Object
  extended by org.bouncycastle.cms.CMSEnvelopedGenerator
      extended by org.bouncycastle.cms.CMSAuthenticatedGenerator
Direct Known Subclasses:
CMSAuthenticatedDataGenerator, CMSAuthenticatedDataStreamGenerator

public class CMSAuthenticatedGenerator
extends CMSEnvelopedGenerator


Field Summary
protected  CMSAttributeTableGenerator authGen
           
protected  CMSAttributeTableGenerator unauthGen
           
 
Fields inherited from class org.bouncycastle.cms.CMSEnvelopedGenerator
AES128_CBC, AES128_WRAP, AES192_CBC, AES192_WRAP, AES256_CBC, AES256_WRAP, CAMELLIA128_CBC, CAMELLIA128_WRAP, CAMELLIA192_CBC, CAMELLIA192_WRAP, CAMELLIA256_CBC, CAMELLIA256_WRAP, CAST5_CBC, DES_EDE3_CBC, DES_EDE3_WRAP, ECDH_SHA1KDF, ECMQV_SHA1KDF, IDEA_CBC, RC2_CBC, SEED_CBC, SEED_WRAP, unprotectedAttributeGenerator
 
Constructor Summary
CMSAuthenticatedGenerator()
          base constructor
CMSAuthenticatedGenerator(java.security.SecureRandom rand)
          constructor allowing specific source of randomness
 
Method Summary
protected  java.security.spec.AlgorithmParameterSpec generateParameterSpec(java.lang.String encryptionOID, javax.crypto.SecretKey encKey, java.security.Provider encProvider)
           
protected  AlgorithmIdentifier getAlgorithmIdentifier(java.lang.String encryptionOID, java.security.spec.AlgorithmParameterSpec paramSpec, java.security.Provider provider)
           
protected  java.util.Map getBaseParameters(DERObjectIdentifier contentType, AlgorithmIdentifier digAlgId, byte[] hash)
           
 void setAuthenticatedAttributeGenerator(CMSAttributeTableGenerator authGen)
           
 void setUnauthenticatedAttributeGenerator(CMSAttributeTableGenerator unauthGen)
           
 
Methods inherited from class org.bouncycastle.cms.CMSEnvelopedGenerator
addKEKRecipient, addKEKRecipient, addKeyAgreementRecipient, addKeyAgreementRecipient, addKeyAgreementRecipients, addKeyAgreementRecipients, addKeyTransRecipient, addKeyTransRecipient, addPasswordRecipient, addRecipientInfoGenerator, generateParameters, getAlgorithmIdentifier, setUnprotectedAttributeGenerator
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

authGen

protected CMSAttributeTableGenerator authGen

unauthGen

protected CMSAttributeTableGenerator unauthGen
Constructor Detail

CMSAuthenticatedGenerator

public CMSAuthenticatedGenerator()
base constructor


CMSAuthenticatedGenerator

public CMSAuthenticatedGenerator(java.security.SecureRandom rand)
constructor allowing specific source of randomness

Parameters:
rand - instance of SecureRandom to use
Method Detail

getAlgorithmIdentifier

protected AlgorithmIdentifier getAlgorithmIdentifier(java.lang.String encryptionOID,
                                                     java.security.spec.AlgorithmParameterSpec paramSpec,
                                                     java.security.Provider provider)
                                              throws java.io.IOException,
                                                     java.security.NoSuchAlgorithmException,
                                                     java.security.spec.InvalidParameterSpecException
Throws:
java.io.IOException
java.security.NoSuchAlgorithmException
java.security.spec.InvalidParameterSpecException

generateParameterSpec

protected java.security.spec.AlgorithmParameterSpec generateParameterSpec(java.lang.String encryptionOID,
                                                                          javax.crypto.SecretKey encKey,
                                                                          java.security.Provider encProvider)
                                                                   throws CMSException
Throws:
CMSException

setAuthenticatedAttributeGenerator

public void setAuthenticatedAttributeGenerator(CMSAttributeTableGenerator authGen)

setUnauthenticatedAttributeGenerator

public void setUnauthenticatedAttributeGenerator(CMSAttributeTableGenerator unauthGen)

getBaseParameters

protected java.util.Map getBaseParameters(DERObjectIdentifier contentType,
                                          AlgorithmIdentifier digAlgId,
                                          byte[] hash)

Bouncy Castle Cryptography 1.46