Class SignHelper


  • public class SignHelper
    extends java.lang.Object
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String hashFunctionName  
      static java.io.OutputStream NULL  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static org.bouncycastle.cms.CMSSignedDataGenerator createSignedDataGenerator​(java.security.KeyStore keyStore, java.lang.String keyAlias, java.lang.String signAlgo, java.lang.String keyPassword)
      Creates the beast that can actually sign the data (for JKS, for other make it).
      static org.bouncycastle.cms.CMSSignedDataGenerator createSignedDataGenerator​(java.security.PrivateKey privateKey, java.security.cert.Certificate cert, java.util.List<java.security.cert.Certificate> certChain, java.lang.String signAlgo)  
      static java.security.KeyStore getStore​(java.nio.file.Path file, java.lang.String storepass, java.lang.String algo)
      Creates the KeyStore with given algo.
      static java.security.MessageDigest hasher()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • NULL

        public static final java.io.OutputStream NULL
      • hashFunctionName

        public static final java.lang.String hashFunctionName
        See Also:
        Constant Field Values
    • Method Detail

      • getStore

        public static java.security.KeyStore getStore​(java.nio.file.Path file,
                                                      java.lang.String storepass,
                                                      java.lang.String algo)
                                               throws java.io.IOException
        Creates the KeyStore with given algo.
        Throws:
        java.io.IOException
      • createSignedDataGenerator

        public static org.bouncycastle.cms.CMSSignedDataGenerator createSignedDataGenerator​(java.security.KeyStore keyStore,
                                                                                            java.lang.String keyAlias,
                                                                                            java.lang.String signAlgo,
                                                                                            java.lang.String keyPassword)
                                                                                     throws java.security.KeyStoreException,
                                                                                            org.bouncycastle.operator.OperatorCreationException,
                                                                                            java.security.cert.CertificateEncodingException,
                                                                                            java.security.UnrecoverableKeyException,
                                                                                            java.security.NoSuchAlgorithmException,
                                                                                            org.bouncycastle.cms.CMSException
        Creates the beast that can actually sign the data (for JKS, for other make it).
        Throws:
        java.security.KeyStoreException
        org.bouncycastle.operator.OperatorCreationException
        java.security.cert.CertificateEncodingException
        java.security.UnrecoverableKeyException
        java.security.NoSuchAlgorithmException
        org.bouncycastle.cms.CMSException
      • createSignedDataGenerator

        public static org.bouncycastle.cms.CMSSignedDataGenerator createSignedDataGenerator​(java.security.PrivateKey privateKey,
                                                                                            java.security.cert.Certificate cert,
                                                                                            java.util.List<java.security.cert.Certificate> certChain,
                                                                                            java.lang.String signAlgo)
                                                                                     throws org.bouncycastle.operator.OperatorCreationException,
                                                                                            java.security.cert.CertificateEncodingException,
                                                                                            org.bouncycastle.cms.CMSException
        Throws:
        org.bouncycastle.operator.OperatorCreationException
        java.security.cert.CertificateEncodingException
        org.bouncycastle.cms.CMSException
      • hasher

        public static java.security.MessageDigest hasher()