Class PGPDataFormat.Builder
java.lang.Object
org.apache.camel.model.dataformat.PGPDataFormat.Builder
- All Implemented Interfaces:
DataFormatBuilder<PGPDataFormat>
- Enclosing class:
- PGPDataFormat
public static class PGPDataFormat.Builder
extends Object
implements DataFormatBuilder<PGPDataFormat>
Builder
is a specific builder for PGPDataFormat
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionalgorithm
(int algorithm) Symmetric key encryption algorithm; possible values are defined in org.bouncycastle.bcpg.SymmetricKeyAlgorithmTags; for example 2 (= TRIPLE DES), 3 (= CAST5), 4 (= BLOWFISH), 6 (= DES), 7 (= AES_128).Symmetric key encryption algorithm; possible values are defined in org.bouncycastle.bcpg.SymmetricKeyAlgorithmTags; for example 2 (= TRIPLE DES), 3 (= CAST5), 4 (= BLOWFISH), 6 (= DES), 7 (= AES_128).armored
(boolean armored) This option will cause PGP to base64 encode the encrypted text, making it available for copy/paste, etc.This option will cause PGP to base64 encode the encrypted text, making it available for copy/paste, etc.compressionAlgorithm
(int compressionAlgorithm) Compression algorithm; possible values are defined in org.bouncycastle.bcpg.CompressionAlgorithmTags; for example 0 (= UNCOMPRESSED), 1 (= ZIP), 2 (= ZLIB), 3 (= BZIP2).compressionAlgorithm
(String compressionAlgorithm) Compression algorithm; possible values are defined in org.bouncycastle.bcpg.CompressionAlgorithmTags; for example 0 (= UNCOMPRESSED), 1 (= ZIP), 2 (= ZLIB), 3 (= BZIP2).end()
Ends the build of the data format.hashAlgorithm
(int hashAlgorithm) Signature hash algorithm; possible values are defined in org.bouncycastle.bcpg.HashAlgorithmTags; for example 2 (= SHA1), 8 (= SHA256), 9 (= SHA384), 10 (= SHA512), 11 (=SHA224).hashAlgorithm
(String hashAlgorithm) Signature hash algorithm; possible values are defined in org.bouncycastle.bcpg.HashAlgorithmTags; for example 2 (= SHA1), 8 (= SHA256), 9 (= SHA384), 10 (= SHA512), 11 (=SHA224).integrity
(boolean integrity) Adds an integrity check/sign into the encryption file.Adds an integrity check/sign into the encryption file.keyFileName
(String keyFileName) Filename of the keyring; must be accessible as a classpath resource (but you can specify a location in the file system by using the "file:" prefix).The user ID of the key in the PGP keyring used during encryption.Password used when opening the private key (not used for encryption).Java Cryptography Extension (JCE) provider, default is Bouncy Castle ("BC").signatureKeyFileName
(String signatureKeyFileName) Filename of the keyring to use for signing (during encryption) or for signature verification (during decryption); must be accessible as a classpath resource (but you can specify a location in the file system by using the "file:" prefix).signatureKeyRing
(String signatureKeyRing) Keyring used for signing/verifying as byte array.signatureKeyUserid
(String signatureKeyUserid) User ID of the key in the PGP keyring used for signing (during encryption) or signature verification (during decryption).signaturePassword
(String signaturePassword) Password used when opening the private key used for signing (during encryption).signatureVerificationOption
(String signatureVerificationOption) Controls the behavior for verifying the signature during unmarshaling.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
signatureKeyUserid
User ID of the key in the PGP keyring used for signing (during encryption) or signature verification (during decryption). During the signature verification process the specified User ID restricts the public keys from the public keyring which can be used for the verification. If no User ID is specified for the signature verficiation then any public key in the public keyring can be used for the verification. Can also be only a part of a user ID. For example, if the user ID is "Test User <[email protected]>" then you can use the part "Test User" or "<[email protected]>" to address the User ID. -
signaturePassword
Password used when opening the private key used for signing (during encryption). -
signatureKeyFileName
Filename of the keyring to use for signing (during encryption) or for signature verification (during decryption); must be accessible as a classpath resource (but you can specify a location in the file system by using the "file:" prefix). -
signatureKeyRing
Keyring used for signing/verifying as byte array. You can not set the signatureKeyFileName and signatureKeyRing at the same time. -
hashAlgorithm
Signature hash algorithm; possible values are defined in org.bouncycastle.bcpg.HashAlgorithmTags; for example 2 (= SHA1), 8 (= SHA256), 9 (= SHA384), 10 (= SHA512), 11 (=SHA224). Only relevant for signing. -
hashAlgorithm
Signature hash algorithm; possible values are defined in org.bouncycastle.bcpg.HashAlgorithmTags; for example 2 (= SHA1), 8 (= SHA256), 9 (= SHA384), 10 (= SHA512), 11 (=SHA224). Only relevant for signing. -
armored
This option will cause PGP to base64 encode the encrypted text, making it available for copy/paste, etc. -
armored
This option will cause PGP to base64 encode the encrypted text, making it available for copy/paste, etc. -
integrity
Adds an integrity check/sign into the encryption file. The default value is true. -
integrity
Adds an integrity check/sign into the encryption file. The default value is true. -
keyFileName
Filename of the keyring; must be accessible as a classpath resource (but you can specify a location in the file system by using the "file:" prefix). -
keyUserid
The user ID of the key in the PGP keyring used during encryption. Can also be only a part of a user ID. For example, if the user ID is "Test User <[email protected]>" then you can use the part "Test User" or "<[email protected]>" to address the user ID. -
algorithm
Symmetric key encryption algorithm; possible values are defined in org.bouncycastle.bcpg.SymmetricKeyAlgorithmTags; for example 2 (= TRIPLE DES), 3 (= CAST5), 4 (= BLOWFISH), 6 (= DES), 7 (= AES_128). Only relevant for encrypting. -
algorithm
Symmetric key encryption algorithm; possible values are defined in org.bouncycastle.bcpg.SymmetricKeyAlgorithmTags; for example 2 (= TRIPLE DES), 3 (= CAST5), 4 (= BLOWFISH), 6 (= DES), 7 (= AES_128). Only relevant for encrypting. -
compressionAlgorithm
Compression algorithm; possible values are defined in org.bouncycastle.bcpg.CompressionAlgorithmTags; for example 0 (= UNCOMPRESSED), 1 (= ZIP), 2 (= ZLIB), 3 (= BZIP2). Only relevant for encrypting. -
compressionAlgorithm
Compression algorithm; possible values are defined in org.bouncycastle.bcpg.CompressionAlgorithmTags; for example 0 (= UNCOMPRESSED), 1 (= ZIP), 2 (= ZLIB), 3 (= BZIP2). Only relevant for encrypting. -
password
Password used when opening the private key (not used for encryption). -
provider
Java Cryptography Extension (JCE) provider, default is Bouncy Castle ("BC"). Alternatively you can use, for example, the IAIK JCE provider; in this case the provider must be registered beforehand and the Bouncy Castle provider must not be registered beforehand. The Sun JCE provider does not work. -
signatureVerificationOption
Controls the behavior for verifying the signature during unmarshaling. There are 4 values possible: "optional": The PGP message may or may not contain signatures; if it does contain signatures, then a signature verification is executed. "required": The PGP message must contain at least one signature; if this is not the case an exception (PGPException) is thrown. A signature verification is executed. "ignore": Contained signatures in the PGP message are ignored; no signature verification is executed. "no_signature_allowed": The PGP message must not contain a signature; otherwise an exception (PGPException) is thrown. -
end
Description copied from interface:DataFormatBuilder
Ends the build of the data format.- Specified by:
end
in interfaceDataFormatBuilder<PGPDataFormat>
- Returns:
- the data format fully built.
-