public class PgpEncrypter extends Object
| Modifier and Type | Field and Description |
|---|---|
static org.bouncycastle.openpgp.operator.bc.BcKeyFingerprintCalculator |
KEY_FINGERPRINT_CALCULATOR |
static org.bouncycastle.openpgp.operator.bc.BcPBESecretKeyDecryptorBuilder |
PBE_SECRET_KEY_DECRYPTOR_BUILDER |
static org.bouncycastle.openpgp.operator.bc.BcPGPDigestCalculatorProvider |
PGP_DIGEST_CALCULATOR_PROVIDER |
| Constructor and Description |
|---|
PgpEncrypter(PgpConfiguration config) |
| Modifier and Type | Method and Description |
|---|---|
InputStream |
decrypt(InputStream inputData,
String fileName,
boolean validateIfSignatureFound) |
InputStream |
encrypt(InputStream inputData,
String fileName,
PgpKeyInfo encryptKeyInfo,
PgpEncryptionAlgorithm algorithm,
boolean disableMDC) |
InputStream |
encrypt(InputStream inputData,
String fileName,
PgpKeyInfo encryptKeyInfo,
PgpEncryptionAlgorithm algorithm,
Optional<PgpKeyInfo> signKeyInfo,
boolean disableMDC) |
static String |
formatKeyFingerprint(Long fingerprint) |
protected com.mulesoft.modules.cryptography.internal.pgp.PgpEncrypter.SignatureGeneratorClosable |
generateSignatureGeneratorClosable(Optional<PgpKeyInfo> signerKeyInfo,
OutputStream compressorEntryPoint)
Generates a
SignatureGeneratorClosable whether or not a signature of the message was required. |
public static final org.bouncycastle.openpgp.operator.bc.BcKeyFingerprintCalculator KEY_FINGERPRINT_CALCULATOR
public static final org.bouncycastle.openpgp.operator.bc.BcPGPDigestCalculatorProvider PGP_DIGEST_CALCULATOR_PROVIDER
public static final org.bouncycastle.openpgp.operator.bc.BcPBESecretKeyDecryptorBuilder PBE_SECRET_KEY_DECRYPTOR_BUILDER
public PgpEncrypter(PgpConfiguration config)
public InputStream encrypt(InputStream inputData, String fileName, PgpKeyInfo encryptKeyInfo, PgpEncryptionAlgorithm algorithm, boolean disableMDC)
public InputStream encrypt(InputStream inputData, String fileName, PgpKeyInfo encryptKeyInfo, PgpEncryptionAlgorithm algorithm, Optional<PgpKeyInfo> signKeyInfo, boolean disableMDC)
protected com.mulesoft.modules.cryptography.internal.pgp.PgpEncrypter.SignatureGeneratorClosable generateSignatureGeneratorClosable(Optional<PgpKeyInfo> signerKeyInfo, OutputStream compressorEntryPoint) throws org.bouncycastle.openpgp.PGPException, IOException
SignatureGeneratorClosable whether or not a signature of the message was required.signerKeyInfo - The signer (usually message sender) key info, from which the private key will be used.compressorEntryPoint - org.bouncycastle.openpgp.PGPExceptionIOExceptionpublic InputStream decrypt(InputStream inputData, String fileName, boolean validateIfSignatureFound)
Copyright © 2019 MuleSoft, Inc.. All rights reserved.