public class SplitProviderDirectSignedDataGenerator extends org.bouncycastle.cms.CMSSignedDataGenerator implements DirectSignedDataGenerator
DATA, DIGEST_GOST3411, DIGEST_MD5, DIGEST_RIPEMD128, DIGEST_RIPEMD160, DIGEST_RIPEMD256, DIGEST_SHA1, DIGEST_SHA224, DIGEST_SHA256, DIGEST_SHA384, DIGEST_SHA512, ENCRYPTION_DSA, ENCRYPTION_ECDSA, ENCRYPTION_ECGOST3410, ENCRYPTION_GOST3410, ENCRYPTION_RSA, ENCRYPTION_RSA_PSS| Constructor and Description |
|---|
SplitProviderDirectSignedDataGenerator(String sigProvider,
String digestProvider)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
addSigner(PrivateKey key,
X509Certificate cert,
String digestOID,
org.bouncycastle.asn1.cms.AttributeTable signedAttr,
org.bouncycastle.asn1.cms.AttributeTable unsignedAttr)
Adds a message signer to the message.
|
org.bouncycastle.cms.CMSSignedData |
generate(org.bouncycastle.cms.CMSProcessable content)
Generates a CMSSignedData object that represents the content's digital signature.
|
org.bouncycastle.cms.CMSSignedData |
generate(String signedContentType,
org.bouncycastle.cms.CMSProcessable content,
boolean encapsulate,
String sigProvider,
boolean addDefaultAttributes) |
addSigner, addSigner, generate, generate, generate, generateCounterSignersaddAttributeCertificates, addCertificatesAndCRLs, addSigners, getGeneratedDigestsequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddCertificatesAndCRLspublic SplitProviderDirectSignedDataGenerator(String sigProvider, String digestProvider)
sigProvider - The name of the JCE provider used to perform the signing operation. If this is null or empty,
the CryptoExtensions.getJCESensitiveProviderName() value will be used.digestProvider - The name of the JCE provider used to perform the digest operation. If this is null or empty,
the CryptoExtensions.getJCEProviderName() value will be used.public org.bouncycastle.cms.CMSSignedData generate(org.bouncycastle.cms.CMSProcessable content)
throws NoSuchAlgorithmException,
NoSuchProviderException,
org.bouncycastle.cms.CMSException
generate in interface DirectSignedDataGeneratorcontent - The content to be signed.NoSuchAlgorithmExceptionNoSuchProviderExceptionorg.bouncycastle.cms.CMSExceptionpublic void addSigner(PrivateKey key, X509Certificate cert, String digestOID, org.bouncycastle.asn1.cms.AttributeTable signedAttr, org.bouncycastle.asn1.cms.AttributeTable unsignedAttr) throws IllegalArgumentException
addSigner in interface DirectSignedDataGeneratoraddSigner in class org.bouncycastle.cms.CMSSignedDataGeneratorkey - The private key used to digitally sign the message.cert - The X.509 certificate whose public key matches up with the private key.digestOID - The digest algorithm used to generate the message hash.signedAttr - Signed attributesunsignedAttr - Unsigned attributes.IllegalArgumentExceptionpublic org.bouncycastle.cms.CMSSignedData generate(String signedContentType, org.bouncycastle.cms.CMSProcessable content, boolean encapsulate, String sigProvider, boolean addDefaultAttributes) throws NoSuchAlgorithmException, NoSuchProviderException, org.bouncycastle.cms.CMSException
generate in class org.bouncycastle.cms.CMSSignedDataGeneratorNoSuchAlgorithmExceptionNoSuchProviderExceptionorg.bouncycastle.cms.CMSExceptionCopyright © 2010-2016 NHIN Direct. All Rights Reserved.