public class DefaultPGPPublicKeyAccessor extends Object implements PGPPublicKeyAccessor
Constructor and Description |
---|
DefaultPGPPublicKeyAccessor(byte[] publicKeyRing) |
Modifier and Type | Method and Description |
---|---|
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.
|
public DefaultPGPPublicKeyAccessor(byte[] publicKeyRing) throws IOException, org.bouncycastle.openpgp.PGPException
IOException
org.bouncycastle.openpgp.PGPException
public List<org.bouncycastle.openpgp.PGPPublicKey> getEncryptionKeys(org.apache.camel.Exchange exchange, List<String> useridParts) throws Exception
PGPPublicKeyAccessor
getEncryptionKeys
in interface PGPPublicKeyAccessor
exchange
- exchange, can be null
useridParts
- parts of User IDs, must not be null
null
Exception
public org.bouncycastle.openpgp.PGPPublicKey getPublicKey(org.apache.camel.Exchange exchange, long keyId, List<String> userIdParts) throws Exception
PGPPublicKeyAccessor
getPublicKey
in interface PGPPublicKeyAccessor
exchange
- exchangekeyId
- key IDuserIdParts
- parts of User IDs, must not be null
, but can be
emptynull
if the key cannot be foundException
Apache Camel