org.apache.commons.openpgp
Class BouncyCastleKeyRing
java.lang.Object
org.apache.commons.openpgp.BouncyCastleKeyRing
- All Implemented Interfaces:
- KeyRing
public class BouncyCastleKeyRing
- extends java.lang.Object
- implements KeyRing
Bouncy Castle implementation of the OpenPGP key ring.
- Author:
- Brett Porter
Fields inherited from interface org.apache.commons.openpgp.KeyRing |
ROLE |
Constructor Summary |
BouncyCastleKeyRing(java.io.InputStream secretKeyRingStream,
java.io.InputStream publicKeyRingStream,
char[] password)
|
Method Summary |
char[] |
getPassword()
|
org.bouncycastle.openpgp.PGPPublicKey |
getPublicKey(long keyId)
|
org.bouncycastle.openpgp.PGPPublicKey |
getPublicKey(java.lang.String keyId)
|
org.bouncycastle.openpgp.PGPSecretKey |
getSecretKey(long keyId)
|
org.bouncycastle.openpgp.PGPSecretKey |
getSecretKey(java.lang.String keyId)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BouncyCastleKeyRing
public BouncyCastleKeyRing(java.io.InputStream secretKeyRingStream,
java.io.InputStream publicKeyRingStream,
char[] password)
throws java.io.IOException,
org.bouncycastle.openpgp.PGPException
- Throws:
java.io.IOException
org.bouncycastle.openpgp.PGPException
getPassword
public char[] getPassword()
- Specified by:
getPassword
in interface KeyRing
- Returns:
getSecretKey
public org.bouncycastle.openpgp.PGPSecretKey getSecretKey(java.lang.String keyId)
- Specified by:
getSecretKey
in interface KeyRing
- Returns:
getPublicKey
public org.bouncycastle.openpgp.PGPPublicKey getPublicKey(java.lang.String keyId)
- Specified by:
getPublicKey
in interface KeyRing
- Returns:
getSecretKey
public org.bouncycastle.openpgp.PGPSecretKey getSecretKey(long keyId)
- Specified by:
getSecretKey
in interface KeyRing
- Returns:
getPublicKey
public org.bouncycastle.openpgp.PGPPublicKey getPublicKey(long keyId)
- Specified by:
getPublicKey
in interface KeyRing
- Returns: