public class CMSSignedGenerator extends Object
| Modifier and Type | Field and Description |
|---|---|
protected List |
_signers |
protected List |
certs |
protected List |
crls |
static String |
DATA
Default type for the signed data.
|
static String |
DIGEST_GOST3411 |
static String |
DIGEST_MD5 |
static String |
DIGEST_RIPEMD128 |
static String |
DIGEST_RIPEMD160 |
static String |
DIGEST_RIPEMD256 |
static String |
DIGEST_SHA1 |
static String |
DIGEST_SHA224 |
static String |
DIGEST_SHA256 |
static String |
DIGEST_SHA384 |
static String |
DIGEST_SHA512 |
protected Map |
digests |
static String |
ENCRYPTION_DSA |
static String |
ENCRYPTION_ECDSA |
static String |
ENCRYPTION_ECGOST3410 |
static String |
ENCRYPTION_GOST3410 |
static String |
ENCRYPTION_RSA |
static String |
ENCRYPTION_RSA_PSS |
protected SecureRandom |
rand |
protected List |
signerGens |
| Modifier | Constructor and Description |
|---|---|
protected |
CMSSignedGenerator()
base constructor
|
protected |
CMSSignedGenerator(SecureRandom rand)
constructor allowing specific source of randomness
|
| Modifier and Type | Method and Description |
|---|---|
void |
addAttributeCertificates(org.bouncycastle.util.Store attrStore) |
void |
addAttributeCertificates(org.bouncycastle.x509.X509Store store)
Deprecated.
use basic Store method
|
void |
addCertificates(org.bouncycastle.util.Store certStore) |
void |
addCertificatesAndCRLs(CertStore certStore)
Deprecated.
use addCertificates and addCRLs
|
void |
addCRLs(org.bouncycastle.util.Store crlStore) |
void |
addSignerInfoGenerator(SignerInfoGenerator infoGen) |
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 Map |
getBaseParameters(org.bouncycastle.asn1.DERObjectIdentifier contentType,
org.bouncycastle.asn1.x509.AlgorithmIdentifier digAlgId,
byte[] hash) |
protected org.bouncycastle.asn1.x509.AlgorithmIdentifier |
getEncAlgorithmIdentifier(String encOid,
Signature sig) |
protected String |
getEncOID(PrivateKey key,
String digestOID) |
Map |
getGeneratedDigests()
Return a map of oids and byte arrays representing the digests calculated on the content during
the last generate.
|
public static final String DATA
public static final String DIGEST_SHA1
public static final String DIGEST_SHA224
public static final String DIGEST_SHA256
public static final String DIGEST_SHA384
public static final String DIGEST_SHA512
public static final String DIGEST_MD5
public static final String DIGEST_GOST3411
public static final String DIGEST_RIPEMD128
public static final String DIGEST_RIPEMD160
public static final String DIGEST_RIPEMD256
public static final String ENCRYPTION_RSA
public static final String ENCRYPTION_DSA
public static final String ENCRYPTION_ECDSA
public static final String ENCRYPTION_RSA_PSS
public static final String ENCRYPTION_GOST3410
public static final String ENCRYPTION_ECGOST3410
protected List certs
protected List crls
protected List _signers
protected List signerGens
protected Map digests
protected final SecureRandom rand
protected CMSSignedGenerator()
protected CMSSignedGenerator(SecureRandom rand)
rand - instance of SecureRandom to useprotected String getEncOID(PrivateKey key, String digestOID)
protected org.bouncycastle.asn1.x509.AlgorithmIdentifier getEncAlgorithmIdentifier(String encOid, Signature sig) throws IOException
IOExceptionprotected 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(CertStore certStore) throws CertStoreException, CMSException
Note: this assumes the CertStore will support null in the get methods.
certStore - CertStore containing the public key certificates and CRLsCertStoreException - if an issue occurs processing the CertStoreCMSException - if an issue occurse transforming data from the CertStore into the messagepublic void addCertificates(org.bouncycastle.util.Store certStore)
throws CMSException
CMSExceptionpublic void addCRLs(org.bouncycastle.util.Store crlStore)
throws CMSException
CMSExceptionpublic void addAttributeCertificates(org.bouncycastle.util.Store attrStore)
throws CMSException
CMSExceptionpublic void addAttributeCertificates(org.bouncycastle.x509.X509Store store)
throws CMSException
store - a store of Version 2 attribute certificatesCMSException - if an error occurse processing the store.public void addSigners(SignerInformationStore signerStore)
signerStore - store of signerspublic void addSignerInfoGenerator(SignerInfoGenerator infoGen)
public Map getGeneratedDigests()
Copyright © 2014. All rights reserved.