Class JcaContentSignerBuilder


  • public class JcaContentSignerBuilder
    extends java.lang.Object
    General builder class for ContentSigner operators based on the JCA.
    • Constructor Summary

      Constructors 
      Constructor 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, java.security.PublicKey verificationKey)
      Constructor which calculates the digest algorithm used from the public key, if necessary.
      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, org.bouncycastle.asn1.x509.AlgorithmIdentifier signatureDigestAlgorithmID)
      Constructor which includes the digest algorithm identifier used.
    • Constructor Detail

      • JcaContentSignerBuilder

        public JcaContentSignerBuilder​(java.lang.String signatureAlgorithm)
        Construct a basic content signer where the signature algorithm name tells us all we need to know.
        Parameters:
        signatureAlgorithm - the signature algorithm we perform.
      • JcaContentSignerBuilder

        public JcaContentSignerBuilder​(java.lang.String signatureAlgorithm,
                                       java.security.PublicKey verificationKey)
        Constructor which calculates the digest algorithm used from the public key, if necessary.

        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.

        Parameters:
        signatureAlgorithm - the signature algorithm we perform.
        verificationKey - the public key associated with our private key.
      • JcaContentSignerBuilder

        public JcaContentSignerBuilder​(java.lang.String signatureAlgorithm,
                                       org.bouncycastle.asn1.x509.AlgorithmIdentifier signatureDigestAlgorithmID)
        Constructor which includes the digest algorithm identifier used.

        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.

        Parameters:
        signatureAlgorithm - the signature algorithm we perform.
        signatureDigestAlgorithmID - the public key associated with our private key.
      • JcaContentSignerBuilder

        public JcaContentSignerBuilder​(java.lang.String signatureAlgorithm,
                                       java.security.spec.AlgorithmParameterSpec sigParamSpec)
      • JcaContentSignerBuilder

        public JcaContentSignerBuilder​(java.lang.String signatureAlgorithm,
                                       java.security.spec.AlgorithmParameterSpec sigParamSpec,
                                       org.bouncycastle.asn1.x509.AlgorithmIdentifier signatureDigestAlgorithmID)