Interface PGPSecretKeyAccessor
-
- All Known Implementing Classes:
DefaultPGPSecretKeyAccessor
,PGPDataFormat
public interface PGPSecretKeyAccessor
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description org.bouncycastle.openpgp.PGPPrivateKey
getPrivateKey(org.apache.camel.Exchange exchange, long keyId)
Returns the private key with a certain key ID.List<PGPSecretKeyAndPrivateKeyAndUserId>
getSignerKeys(org.apache.camel.Exchange exchange, List<String> useridParts)
Returns the signer keys for the given user ID parts.
-
-
-
Method Detail
-
getSignerKeys
List<PGPSecretKeyAndPrivateKeyAndUserId> getSignerKeys(org.apache.camel.Exchange exchange, List<String> useridParts) throws Exception
Returns the signer keys for the given user ID parts. This method is used for signing.- Parameters:
exchange
- exchange, can benull
useridParts
- parts of User IDs, can benull
or empty, then an empty list must be returned- Returns:
- list of secret keys with their private keys and User Ids which corresponds to one of the
useridParts, must not be
null
, can be empty - Throws:
Exception
-
getPrivateKey
org.bouncycastle.openpgp.PGPPrivateKey getPrivateKey(org.apache.camel.Exchange exchange, long keyId) throws Exception
Returns the private key with a certain key ID. This method is used for decrypting.- Parameters:
exchange
- exchange, can benull
keyId
- key ID- Returns:
- private key or
null
if the key cannot be found - Throws:
Exception
-
-