public class DefaultPGPSecretKeyAccessor extends Object implements PGPSecretKeyAccessor
Constructor and Description |
---|
DefaultPGPSecretKeyAccessor(byte[] secretKeyRing,
String password,
String provider) |
Modifier and Type | Method and 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.
|
public DefaultPGPSecretKeyAccessor(byte[] secretKeyRing, String password, String provider) throws org.bouncycastle.openpgp.PGPException, IOException
secretKeyRing
- secret key ring as byte arraypassword
- password for the private keys, assuming that all private keys
have the same passwordprovider
- org.bouncycastle.openpgp.PGPException
IOException
public List<PGPSecretKeyAndPrivateKeyAndUserId> getSignerKeys(org.apache.camel.Exchange exchange, List<String> useridParts) throws Exception
PGPSecretKeyAccessor
getSignerKeys
in interface PGPSecretKeyAccessor
exchange
- exchange, can be null
useridParts
- parts of User IDs, can be null
or empty, then an
empty list must be returnednull
, can be emptyException
public org.bouncycastle.openpgp.PGPPrivateKey getPrivateKey(org.apache.camel.Exchange exchange, long keyId) throws Exception
PGPSecretKeyAccessor
getPrivateKey
in interface PGPSecretKeyAccessor
exchange
- exchange, can be null
keyId
- key IDnull
if the key cannot be foundException
Apache Camel