Class PGPDataFormatUtil
java.lang.Object
org.apache.camel.converter.crypto.PGPDataFormatUtil
-
Method Summary
Modifier and TypeMethodDescriptionstatic org.bouncycastle.openpgp.PGPPrivateKey
findPrivateKeyWithkeyId
(long keyid, String passphrase, PGPPassphraseAccessor passphraseAccessor, String provider, org.bouncycastle.openpgp.PGPSecretKeyRingCollection pgpSec) static org.bouncycastle.openpgp.PGPPrivateKey
findPrivateKeyWithKeyId
(org.apache.camel.CamelContext context, String filename, byte[] secretKeyRing, long keyid, String passphrase, PGPPassphraseAccessor passpraseAccessor, String provider) static List<org.bouncycastle.openpgp.PGPPublicKey>
findPublicKeys
(List<String> useridParts, boolean forEncryption, org.bouncycastle.openpgp.PGPPublicKeyRingCollection pgpPublicKeyringCollection) static List<org.bouncycastle.openpgp.PGPPublicKey>
findPublicKeys
(org.apache.camel.CamelContext context, String filename, byte[] keyRing, List<String> userids, boolean forEncryption) findSecretKeysWithPrivateKeyAndUserId
(Map<String, String> sigKeyUserId2Password, String provider, org.bouncycastle.openpgp.PGPSecretKeyRingCollection pgpSec) findSecretKeysWithPrivateKeyAndUserId
(org.apache.camel.CamelContext context, String keychainFilename, byte[] secKeyRing, Map<String, String> sigKeyUserId2Password, String provider) static org.bouncycastle.openpgp.PGPPublicKeyRingCollection
getPublicKeyRingCollection
(org.apache.camel.CamelContext context, String filename, byte[] keyRing, boolean forEncryption) static org.bouncycastle.openpgp.PGPPublicKey
getPublicKeyWithKeyIdAndUserID
(long keyId, List<String> userIdParts, org.bouncycastle.openpgp.PGPPublicKeyRingCollection publicKeyringCollection) Determines a public key from the keyring collection which has a certain key ID and which has a User ID which contains at least one of the User ID parts.
-
Method Details
-
findPublicKeys
public static List<org.bouncycastle.openpgp.PGPPublicKey> findPublicKeys(org.apache.camel.CamelContext context, String filename, byte[] keyRing, List<String> userids, boolean forEncryption) throws IOException, org.bouncycastle.openpgp.PGPException - Throws:
IOException
org.bouncycastle.openpgp.PGPException
-
getPublicKeyRingCollection
public static org.bouncycastle.openpgp.PGPPublicKeyRingCollection getPublicKeyRingCollection(org.apache.camel.CamelContext context, String filename, byte[] keyRing, boolean forEncryption) throws IOException, org.bouncycastle.openpgp.PGPException - Throws:
IOException
org.bouncycastle.openpgp.PGPException
-
findPrivateKeyWithKeyId
public static org.bouncycastle.openpgp.PGPPrivateKey findPrivateKeyWithKeyId(org.apache.camel.CamelContext context, String filename, byte[] secretKeyRing, long keyid, String passphrase, PGPPassphraseAccessor passpraseAccessor, String provider) throws IOException, org.bouncycastle.openpgp.PGPException - Throws:
IOException
org.bouncycastle.openpgp.PGPException
-
findPrivateKeyWithkeyId
public static org.bouncycastle.openpgp.PGPPrivateKey findPrivateKeyWithkeyId(long keyid, String passphrase, PGPPassphraseAccessor passphraseAccessor, String provider, org.bouncycastle.openpgp.PGPSecretKeyRingCollection pgpSec) throws org.bouncycastle.openpgp.PGPException - Throws:
org.bouncycastle.openpgp.PGPException
-
findPublicKeys
-
findSecretKeysWithPrivateKeyAndUserId
public static List<PGPSecretKeyAndPrivateKeyAndUserId> findSecretKeysWithPrivateKeyAndUserId(org.apache.camel.CamelContext context, String keychainFilename, byte[] secKeyRing, Map<String, String> sigKeyUserId2Password, String provider) throws IOException, org.bouncycastle.openpgp.PGPException- Throws:
IOException
org.bouncycastle.openpgp.PGPException
-
findSecretKeysWithPrivateKeyAndUserId
public static List<PGPSecretKeyAndPrivateKeyAndUserId> findSecretKeysWithPrivateKeyAndUserId(Map<String, String> sigKeyUserId2Password, String provider, org.bouncycastle.openpgp.PGPSecretKeyRingCollection pgpSec) throws org.bouncycastle.openpgp.PGPException- Throws:
org.bouncycastle.openpgp.PGPException
-
getPublicKeyWithKeyIdAndUserID
public static org.bouncycastle.openpgp.PGPPublicKey getPublicKeyWithKeyIdAndUserID(long keyId, List<String> userIdParts, org.bouncycastle.openpgp.PGPPublicKeyRingCollection publicKeyringCollection) throws org.bouncycastle.openpgp.PGPException Determines a public key from the keyring collection which has a certain key ID and which has a User ID which contains at least one of the User ID parts.- Parameters:
keyId
- key IDuserIdParts
- user ID parts, can be empty, than no filter on the User ID is executedpublicKeyringCollection
- keyring collection- Returns:
- public key or
null
if no fitting key is found - Throws:
org.bouncycastle.openpgp.PGPException
-