public class BcOpenPGPImplementation extends OpenPGPImplementation
OpenPGPImplementation
using Bouncy Castles implementation of OpenPGP classes.Constructor and Description |
---|
BcOpenPGPImplementation() |
Modifier and Type | Method and Description |
---|---|
KeyFingerPrintCalculator |
keyFingerPrintCalculator() |
PBEDataDecryptorFactory |
pbeDataDecryptorFactory(char[] messagePassphrase)
Return an instance of the
PBEDataDecryptorFactory , which is responsible for providing concrete
implementations needed to decrypt OpenPGP messages that were encrypted symmetrically with a passphrase. |
PBEKeyEncryptionMethodGenerator |
pbeKeyEncryptionMethodGenerator(char[] messagePassphrase)
Return an instance of
PBEKeyEncryptionMethodGenerator which is responsible for creating
symmetric-key-based encryptors for OpenPGP messages, using S2K.SALTED_AND_ITERATED mode. |
PBEKeyEncryptionMethodGenerator |
pbeKeyEncryptionMethodGenerator(char[] messagePassphrase,
S2K.Argon2Params argon2Params)
Return an instance of
PBEKeyEncryptionMethodGenerator which is responsible for creating
symmetric-key-based encryptors for OpenPGP messages, using S2K.ARGON_2 mode. |
PBESecretKeyDecryptorBuilderProvider |
pbeSecretKeyDecryptorBuilderProvider()
Return an instance of
PBESecretKeyDecryptorBuilderProvider which is responsible for providing
implementations needed for secret key unlocking. |
PBESecretKeyEncryptorFactory |
pbeSecretKeyEncryptorFactory(boolean aead) |
PBESecretKeyEncryptorFactory |
pbeSecretKeyEncryptorFactory(boolean aead,
int symmetricKeyAlgorithm,
int iterationCount) |
PGPContentSignerBuilder |
pgpContentSignerBuilder(int publicKeyAlgorithm,
int hashAlgorithm)
Return an instance of
PGPContentSignerBuilder , which is responsible for providing concrete
implementations needed for signature creation. |
PGPContentSignerBuilderProvider |
pgpContentSignerBuilderProvider(int hashAlgorithmId) |
PGPContentVerifierBuilderProvider |
pgpContentVerifierBuilderProvider()
Return an instance of
PGPContentVerifierBuilderProvider which is responsible for providing
implementations needed for signature verification. |
PGPDataEncryptorBuilder |
pgpDataEncryptorBuilder(int symmetricKeyAlgorithm)
Return an instance of
PGPDataEncryptorBuilder which is responsible for providing implementations
needed for creating encrypted data packets. |
PGPDigestCalculatorProvider |
pgpDigestCalculatorProvider()
Return an instance of the
PGPDigestCalculatorProvider , which is responsible for providing
concrete PGPDigestCalculator implementations. |
PGPKeyPairGeneratorProvider |
pgpKeyPairGeneratorProvider() |
PGPObjectFactory |
pgpObjectFactory(java.io.InputStream packetInputStream)
Return an instance of
PGPObjectFactory based on the given InputStream . |
PublicKeyDataDecryptorFactory |
publicKeyDataDecryptorFactory(PGPPrivateKey decryptionKey)
Return an instance of the
PublicKeyDataDecryptorFactory , which is responsible for providing
concrete implementations needed to decrypt OpenPGP messages using a PGPPrivateKey . |
PublicKeyKeyEncryptionMethodGenerator |
publicKeyKeyEncryptionMethodGenerator(PGPPublicKey encryptionSubkey)
Return an instance of
PublicKeyKeyEncryptionMethodGenerator which is responsible for
creating public-key-based encryptors for OpenPGP messages. |
SessionKeyDataDecryptorFactory |
sessionKeyDataDecryptorFactory(PGPSessionKey sessionKey)
Return an instance of the
SessionKeyDataDecryptorFactory , which is responsible for providing
concrete implementations needed to decrypt OpenPGP messages using a PGPSessionKey . |
getInstance, policy, setInstance, setPolicy
public PGPObjectFactory pgpObjectFactory(java.io.InputStream packetInputStream)
OpenPGPImplementation
PGPObjectFactory
based on the given InputStream
.pgpObjectFactory
in class OpenPGPImplementation
packetInputStream
- packet input streampublic PGPContentVerifierBuilderProvider pgpContentVerifierBuilderProvider()
OpenPGPImplementation
PGPContentVerifierBuilderProvider
which is responsible for providing
implementations needed for signature verification.pgpContentVerifierBuilderProvider
in class OpenPGPImplementation
public PBESecretKeyDecryptorBuilderProvider pbeSecretKeyDecryptorBuilderProvider()
OpenPGPImplementation
PBESecretKeyDecryptorBuilderProvider
which is responsible for providing
implementations needed for secret key unlocking.pbeSecretKeyDecryptorBuilderProvider
in class OpenPGPImplementation
public PGPDataEncryptorBuilder pgpDataEncryptorBuilder(int symmetricKeyAlgorithm)
OpenPGPImplementation
PGPDataEncryptorBuilder
which is responsible for providing implementations
needed for creating encrypted data packets.pgpDataEncryptorBuilder
in class OpenPGPImplementation
symmetricKeyAlgorithm
- symmetric encryption algorithmpublic PublicKeyKeyEncryptionMethodGenerator publicKeyKeyEncryptionMethodGenerator(PGPPublicKey encryptionSubkey)
OpenPGPImplementation
PublicKeyKeyEncryptionMethodGenerator
which is responsible for
creating public-key-based encryptors for OpenPGP messages.
Public-key-based encryptors are used when a message is encrypted for a recipients public key.publicKeyKeyEncryptionMethodGenerator
in class OpenPGPImplementation
encryptionSubkey
- subkey for which a message shall be encryptedpublic PBEKeyEncryptionMethodGenerator pbeKeyEncryptionMethodGenerator(char[] messagePassphrase)
OpenPGPImplementation
PBEKeyEncryptionMethodGenerator
which is responsible for creating
symmetric-key-based encryptors for OpenPGP messages, using S2K.SALTED_AND_ITERATED
mode.
Symmetric-key-based encryptors are used when a message is encrypted using a passphrase.pbeKeyEncryptionMethodGenerator
in class OpenPGPImplementation
messagePassphrase
- passphrase to encrypt the message withpublic PBEKeyEncryptionMethodGenerator pbeKeyEncryptionMethodGenerator(char[] messagePassphrase, S2K.Argon2Params argon2Params)
OpenPGPImplementation
PBEKeyEncryptionMethodGenerator
which is responsible for creating
symmetric-key-based encryptors for OpenPGP messages, using S2K.ARGON_2
mode.
Symmetric-key-based encryptors are used when a message is encrypted using a passphrase.pbeKeyEncryptionMethodGenerator
in class OpenPGPImplementation
messagePassphrase
- passphrase to encrypt the message withargon2Params
- parameters for the Argon2 hash functionpublic PGPContentSignerBuilder pgpContentSignerBuilder(int publicKeyAlgorithm, int hashAlgorithm)
OpenPGPImplementation
PGPContentSignerBuilder
, which is responsible for providing concrete
implementations needed for signature creation.pgpContentSignerBuilder
in class OpenPGPImplementation
publicKeyAlgorithm
- the signing-keys public-key algorithmhashAlgorithm
- signature hash algorithmpublic PBEDataDecryptorFactory pbeDataDecryptorFactory(char[] messagePassphrase) throws PGPException
OpenPGPImplementation
PBEDataDecryptorFactory
, which is responsible for providing concrete
implementations needed to decrypt OpenPGP messages that were encrypted symmetrically with a passphrase.pbeDataDecryptorFactory
in class OpenPGPImplementation
messagePassphrase
- message passphrasePGPException
- if the factory cannot be instantiatedpublic SessionKeyDataDecryptorFactory sessionKeyDataDecryptorFactory(PGPSessionKey sessionKey)
OpenPGPImplementation
SessionKeyDataDecryptorFactory
, which is responsible for providing
concrete implementations needed to decrypt OpenPGP messages using a PGPSessionKey
.sessionKeyDataDecryptorFactory
in class OpenPGPImplementation
sessionKey
- session keypublic PublicKeyDataDecryptorFactory publicKeyDataDecryptorFactory(PGPPrivateKey decryptionKey)
OpenPGPImplementation
PublicKeyDataDecryptorFactory
, which is responsible for providing
concrete implementations needed to decrypt OpenPGP messages using a PGPPrivateKey
.publicKeyDataDecryptorFactory
in class OpenPGPImplementation
decryptionKey
- private decryption keypublic PGPDigestCalculatorProvider pgpDigestCalculatorProvider() throws PGPException
OpenPGPImplementation
PGPDigestCalculatorProvider
, which is responsible for providing
concrete PGPDigestCalculator
implementations.pgpDigestCalculatorProvider
in class OpenPGPImplementation
PGPException
- if the provider cannot be instantiatedpublic PGPKeyPairGeneratorProvider pgpKeyPairGeneratorProvider()
pgpKeyPairGeneratorProvider
in class OpenPGPImplementation
public PGPContentSignerBuilderProvider pgpContentSignerBuilderProvider(int hashAlgorithmId)
pgpContentSignerBuilderProvider
in class OpenPGPImplementation
public KeyFingerPrintCalculator keyFingerPrintCalculator()
keyFingerPrintCalculator
in class OpenPGPImplementation
public PBESecretKeyEncryptorFactory pbeSecretKeyEncryptorFactory(boolean aead)
pbeSecretKeyEncryptorFactory
in class OpenPGPImplementation
public PBESecretKeyEncryptorFactory pbeSecretKeyEncryptorFactory(boolean aead, int symmetricKeyAlgorithm, int iterationCount)
pbeSecretKeyEncryptorFactory
in class OpenPGPImplementation