Class JcaContextHelper

java.lang.Object
org.c02e.jpgpj.JcaContextHelper

public class JcaContextHelper extends Object
Helper class for Java Cryptography Architecture (JCA) context consisting of provider Note: The following class is not thread safe, the security provider should not be changed during PGP operations
  • Field Details

    • log

      private static final org.slf4j.Logger log
    • securityProvider

      private static Provider securityProvider
  • Constructor Details

    • JcaContextHelper

      private JcaContextHelper()
  • Method Details

    • getSecurityProvider

      public static Provider getSecurityProvider()
      Get the security provider which is used for all operations
    • setSecurityProvider

      public static void setSecurityProvider(Provider securityProvider)
      Set the security provider to be used for all operations.
    • isSecurityProviderNotNull

      static boolean isSecurityProviderNotNull()
    • getJcaKeyFingerprintCalculator

      static org.bouncycastle.openpgp.operator.jcajce.JcaKeyFingerprintCalculator getJcaKeyFingerprintCalculator()
    • getPGPContentVerifierBuilderProvider

      static org.bouncycastle.openpgp.operator.PGPContentVerifierBuilderProvider getPGPContentVerifierBuilderProvider()
    • getPGPDigestCalculatorProvider

      static org.bouncycastle.openpgp.operator.PGPDigestCalculatorProvider getPGPDigestCalculatorProvider() throws org.bouncycastle.openpgp.PGPException
      Throws:
      org.bouncycastle.openpgp.PGPException
    • getJcePBEDataDecryptorFactoryBuilder

      static org.bouncycastle.openpgp.operator.jcajce.JcePBEDataDecryptorFactoryBuilder getJcePBEDataDecryptorFactoryBuilder() throws org.bouncycastle.openpgp.PGPException
      Throws:
      org.bouncycastle.openpgp.PGPException
    • getJcePublicKeyDataDecryptorFactoryBuilder

      static org.bouncycastle.openpgp.operator.jcajce.JcePublicKeyDataDecryptorFactoryBuilder getJcePublicKeyDataDecryptorFactoryBuilder()
    • getPGPDataEncryptorBuilder

      static org.bouncycastle.openpgp.operator.PGPDataEncryptorBuilder getPGPDataEncryptorBuilder(int encAlgorithm)
    • getJcaKeyBoxBuilder

      static org.bouncycastle.gpg.keybox.jcajce.JcaKeyBoxBuilder getJcaKeyBoxBuilder()
    • getJcePBESecretKeyDecryptorBuilder

      static org.bouncycastle.openpgp.operator.jcajce.JcePBESecretKeyDecryptorBuilder getJcePBESecretKeyDecryptorBuilder() throws org.bouncycastle.openpgp.PGPException
      Throws:
      org.bouncycastle.openpgp.PGPException
    • getPublicKeyKeyEncryptionMethodGenerator

      static org.bouncycastle.openpgp.operator.PublicKeyKeyEncryptionMethodGenerator getPublicKeyKeyEncryptionMethodGenerator(org.bouncycastle.openpgp.PGPPublicKey publicKey)
    • getPBEKeyEncryptionMethodGenerator

      static org.bouncycastle.openpgp.operator.PBEKeyEncryptionMethodGenerator getPBEKeyEncryptionMethodGenerator(char[] symmetricPassphraseChars, int hashAlgorithmOrdinal, int workFactor) throws org.bouncycastle.openpgp.PGPException
      Throws:
      org.bouncycastle.openpgp.PGPException
    • getPGPContentSignerBuilder

      static org.bouncycastle.openpgp.operator.PGPContentSignerBuilder getPGPContentSignerBuilder(int keyAlgorithmCode, int hashAlgorithmOrdinal)
    • getBcProviderInstance

      private static Provider getBcProviderInstance()