org.apache.camel.converter.crypto
Interface PGPPublicKeyAccessor
- All Known Implementing Classes:
- DefaultPGPPublicKeyAccessor, PGPDataFormat
public interface PGPPublicKeyAccessor
Method Summary |
List<org.bouncycastle.openpgp.PGPPublicKey> |
getEncryptionKeys(org.apache.camel.Exchange exchange,
List<String> useridParts)
Returns the encryption keys for the given user ID parts. |
org.bouncycastle.openpgp.PGPPublicKey |
getPublicKey(org.apache.camel.Exchange exchange,
long keyId,
List<String> useridParts)
Returns the public key with a certain key ID. |
getEncryptionKeys
List<org.bouncycastle.openpgp.PGPPublicKey> getEncryptionKeys(org.apache.camel.Exchange exchange,
List<String> useridParts)
throws Exception
- Returns the encryption keys for the given user ID parts. This method is
used for encryption.
- Parameters:
exchange
- exchange, can be null
useridParts
- parts of User IDs, must not be null
- Returns:
- list of public keys, must not be
null
- Throws:
Exception
getPublicKey
org.bouncycastle.openpgp.PGPPublicKey getPublicKey(org.apache.camel.Exchange exchange,
long keyId,
List<String> useridParts)
throws Exception
- Returns the public key with a certain key ID. This method is used for
verifying the signature. The given User IDs are provided to filter the
public key, further. If the User ID parts list is empty, then any public
key can be returned which has the specified key ID. If the User ID parts
list is not empty then the returned key must have a User ID which
contains at least one User ID part.
- Parameters:
exchange
- exchangekeyId
- key IDuseridParts
- parts of User IDs, must not be null
, but can be
empty
- Returns:
- public key or
null
if the key cannot be found
- Throws:
Exception
Apache Camel