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.PGPExceptionIOExceptionpublic List<PGPSecretKeyAndPrivateKeyAndUserId> getSignerKeys(org.apache.camel.Exchange exchange, List<String> useridParts) throws Exception
PGPSecretKeyAccessorgetSignerKeys in interface PGPSecretKeyAccessorexchange - exchange, can be nulluseridParts - parts of User IDs, can be null or empty, then an
empty list must be returnednull, can be emptyExceptionpublic org.bouncycastle.openpgp.PGPPrivateKey getPrivateKey(org.apache.camel.Exchange exchange,
long keyId)
throws Exception
PGPSecretKeyAccessorgetPrivateKey in interface PGPSecretKeyAccessorexchange - exchange, can be nullkeyId - key IDnull if the key cannot be foundExceptionApache Camel