|
Bouncy Castle Cryptography Library 1.45 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.bouncycastle.cms.CMSSignedGenerator
public class CMSSignedGenerator
Field Summary | |
---|---|
protected java.util.List |
_certs
|
protected java.util.List |
_crls
|
protected java.util.Map |
_digests
|
protected java.util.List |
_signers
|
static java.lang.String |
DATA
Default type for the signed data. |
static java.lang.String |
DIGEST_GOST3411
|
static java.lang.String |
DIGEST_MD5
|
static java.lang.String |
DIGEST_RIPEMD128
|
static java.lang.String |
DIGEST_RIPEMD160
|
static java.lang.String |
DIGEST_RIPEMD256
|
static java.lang.String |
DIGEST_SHA1
|
static java.lang.String |
DIGEST_SHA224
|
static java.lang.String |
DIGEST_SHA256
|
static java.lang.String |
DIGEST_SHA384
|
static java.lang.String |
DIGEST_SHA512
|
static java.lang.String |
ENCRYPTION_DSA
|
static java.lang.String |
ENCRYPTION_ECDSA
|
static java.lang.String |
ENCRYPTION_ECGOST3410
|
static java.lang.String |
ENCRYPTION_GOST3410
|
static java.lang.String |
ENCRYPTION_RSA
|
static java.lang.String |
ENCRYPTION_RSA_PSS
|
protected java.security.SecureRandom |
rand
|
Constructor Summary | |
---|---|
protected |
CMSSignedGenerator()
base constructor |
protected |
CMSSignedGenerator(java.security.SecureRandom rand)
constructor allowing specific source of randomness |
Method Summary | |
---|---|
void |
addAttributeCertificates(org.bouncycastle.x509.X509Store store)
Add the attribute certificates contained in the passed in store to the generator. |
void |
addCertificatesAndCRLs(java.security.cert.CertStore certStore)
add the certificates and CRLs contained in the given CertStore to the pool that will be included in the encoded signature block. |
void |
addSigners(SignerInformationStore signerStore)
Add a store of precalculated signers to the generator. |
protected org.bouncycastle.asn1.ASN1Set |
getAttributeSet(org.bouncycastle.asn1.cms.AttributeTable attr)
|
protected java.util.Map |
getBaseParameters(org.bouncycastle.asn1.DERObjectIdentifier contentType,
org.bouncycastle.asn1.x509.AlgorithmIdentifier digAlgId,
byte[] hash)
|
protected org.bouncycastle.asn1.x509.AlgorithmIdentifier |
getEncAlgorithmIdentifier(java.lang.String encOid,
java.security.Signature sig)
|
protected java.lang.String |
getEncOID(java.security.PrivateKey key,
java.lang.String digestOID)
|
java.util.Map |
getGeneratedDigests()
Return a map of oids and byte arrays representing the digests calculated on the content during the last generate. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String DATA
public static final java.lang.String DIGEST_SHA1
public static final java.lang.String DIGEST_SHA224
public static final java.lang.String DIGEST_SHA256
public static final java.lang.String DIGEST_SHA384
public static final java.lang.String DIGEST_SHA512
public static final java.lang.String DIGEST_MD5
public static final java.lang.String DIGEST_GOST3411
public static final java.lang.String DIGEST_RIPEMD128
public static final java.lang.String DIGEST_RIPEMD160
public static final java.lang.String DIGEST_RIPEMD256
public static final java.lang.String ENCRYPTION_RSA
public static final java.lang.String ENCRYPTION_DSA
public static final java.lang.String ENCRYPTION_ECDSA
public static final java.lang.String ENCRYPTION_RSA_PSS
public static final java.lang.String ENCRYPTION_GOST3410
public static final java.lang.String ENCRYPTION_ECGOST3410
protected java.util.List _certs
protected java.util.List _crls
protected java.util.List _signers
protected java.util.Map _digests
protected final java.security.SecureRandom rand
Constructor Detail |
---|
protected CMSSignedGenerator()
protected CMSSignedGenerator(java.security.SecureRandom rand)
rand
- instance of SecureRandom to useMethod Detail |
---|
protected java.lang.String getEncOID(java.security.PrivateKey key, java.lang.String digestOID)
protected org.bouncycastle.asn1.x509.AlgorithmIdentifier getEncAlgorithmIdentifier(java.lang.String encOid, java.security.Signature sig) throws java.io.IOException
java.io.IOException
protected java.util.Map getBaseParameters(org.bouncycastle.asn1.DERObjectIdentifier contentType, org.bouncycastle.asn1.x509.AlgorithmIdentifier digAlgId, byte[] hash)
protected org.bouncycastle.asn1.ASN1Set getAttributeSet(org.bouncycastle.asn1.cms.AttributeTable attr)
public void addCertificatesAndCRLs(java.security.cert.CertStore certStore) throws java.security.cert.CertStoreException, CMSException
Note: this assumes the CertStore will support null in the get methods.
certStore
- CertStore containing the public key certificates and CRLs
java.security.cert.CertStoreException
- if an issue occurs processing the CertStore
CMSException
- if an issue occurse transforming data from the CertStore into the messagepublic void addAttributeCertificates(org.bouncycastle.x509.X509Store store) throws CMSException
store
- a store of Version 2 attribute certificates
CMSException
- if an error occurse processing the store.public void addSigners(SignerInformationStore signerStore)
signerStore
- store of signerspublic java.util.Map getGeneratedDigests()
|
Bouncy Castle Cryptography Library 1.45 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |