...
Support of Custom Key Accessors
Since Camel 2.13.0.
There is the possibility to define your You can implement custom key accessors for encryption/signing. The above PGPDataFormat class selects in a certain predefined way the keys which should be used for signing/encryption or verifying/decryption. If you have special requirements how your keys should be selected you should use the PGPKeyAccessDataFormat class instead and implement the interfaces [PGPPublicKeyAccessor|https://github.com/apache/camel/blob/master/components/camel-crypto/src/main/java/org/apache/camel/converter/crypto/PGPPublicKeyAccessor.java] and [PGPSecretKeyAccessor|https://github.com/apache/camel/blob/master/components/camel-crypto/src/main/java/org/apache/camel/converter/crypto/PGPSecretKeyAccessor.java]. There are default implementations [DefaultPGPPublicKeyAccessor|https://github.com/apache/camel/blob/master/components/camel-crypto/src/main/java/org/apache/camel/converter/crypto/DefaultPGPPublicKeyAccessor.java] and [DefaultPGPSecretKeyAccessor|https://github.com/apache/camel/blob/master/components/camel-crypto/src/main/java/org/apache/camel/converter/crypto/DefaultPGPSecretKeyAccessor.java] interfaces PGPPublicKeyAccessor and PGPSecretKeyAccessor as beans. There are default implementations DefaultPGPPublicKeyAccessor and DefaultPGPSecretKeyAccessor which cache the keys, so that not every time the keyring is parsed when the processor is called.
PGPKeyAccessDataFormat has the same options as PGPDataFormat except
...
password
...
,
...
keyFileName
...
,
...
encryptionKeyRing
...
,
...
signaturePassword
...
,
...
signatureKeyFileName
...
,
...
and
...
signatureKeyRing
...
.
Dependencies
To use the Crypto dataformat in your camel routes you need to add the following dependency to your pom.
...