public class JcaContentSignerBuilder
extends java.lang.Object
Constructor and Description |
---|
JcaContentSignerBuilder(java.lang.String signatureAlgorithm)
Construct a basic content signer where the signature algorithm name
tells us all we need to know.
|
JcaContentSignerBuilder(java.lang.String signatureAlgorithm,
org.bouncycastle.asn1.x509.AlgorithmIdentifier signatureDigestAlgorithmID)
Constructor which includes the digest algorithm identifier used.
|
JcaContentSignerBuilder(java.lang.String signatureAlgorithm,
java.security.spec.AlgorithmParameterSpec sigParamSpec) |
JcaContentSignerBuilder(java.lang.String signatureAlgorithm,
java.security.spec.AlgorithmParameterSpec sigParamSpec,
org.bouncycastle.asn1.x509.AlgorithmIdentifier signatureDigestAlgorithmID) |
JcaContentSignerBuilder(java.lang.String signatureAlgorithm,
java.security.PublicKey verificationKey)
Constructor which calculates the digest algorithm used from the public key, if necessary.
|
Modifier and Type | Method and Description |
---|---|
ContentSigner |
build(java.security.PrivateKey privateKey) |
JcaContentSignerBuilder |
setProvider(java.security.Provider provider) |
JcaContentSignerBuilder |
setProvider(java.lang.String providerName) |
JcaContentSignerBuilder |
setSecureRandom(java.security.SecureRandom random) |
public JcaContentSignerBuilder(java.lang.String signatureAlgorithm)
signatureAlgorithm
- the signature algorithm we perform.public JcaContentSignerBuilder(java.lang.String signatureAlgorithm, java.security.PublicKey verificationKey)
Some PKIX operations, such as CMS signing, require the digest algorithm used for in the signature. Some algorithms, such as LMS, use different digests with different parameter sets but the same OID is used to represent the signature. In this case we either need to be told what digest is associated with the parameter set, or we need the public key so we can work it out.
signatureAlgorithm
- the signature algorithm we perform.verificationKey
- the public key associated with our private key.public JcaContentSignerBuilder(java.lang.String signatureAlgorithm, org.bouncycastle.asn1.x509.AlgorithmIdentifier signatureDigestAlgorithmID)
Some PKIX operations, such as CMS signing, require the digest algorithm used for in the signature, this constructor allows the digest algorithm identifier to be explicitly specified.
signatureAlgorithm
- the signature algorithm we perform.signatureDigestAlgorithmID
- the public key associated with our private key.public JcaContentSignerBuilder(java.lang.String signatureAlgorithm, java.security.spec.AlgorithmParameterSpec sigParamSpec)
public JcaContentSignerBuilder(java.lang.String signatureAlgorithm, java.security.spec.AlgorithmParameterSpec sigParamSpec, org.bouncycastle.asn1.x509.AlgorithmIdentifier signatureDigestAlgorithmID)
public JcaContentSignerBuilder setProvider(java.security.Provider provider)
public JcaContentSignerBuilder setProvider(java.lang.String providerName)
public JcaContentSignerBuilder setSecureRandom(java.security.SecureRandom random)
public ContentSigner build(java.security.PrivateKey privateKey) throws OperatorCreationException
OperatorCreationException