org.bouncycastle.openpgp
public class PGPSecretKeyRingCollection extends Object
Constructor Summary | |
---|---|
PGPSecretKeyRingCollection(byte[] encoding) | |
PGPSecretKeyRingCollection(InputStream in)
Build a PGPSecretKeyRingCollection from the passed in input stream.
| |
PGPSecretKeyRingCollection(Collection collection) |
Method Summary | |
---|---|
static PGPSecretKeyRingCollection | addSecretKeyRing(PGPSecretKeyRingCollection ringCollection, PGPSecretKeyRing secretKeyRing)
Return a new collection object containing the contents of the passed in collection and
the passed in secret key ring.
|
void | encode(OutputStream outStream) |
byte[] | getEncoded() |
Iterator | getKeyRings()
return the secret key rings making up this collection. |
Iterator | getKeyRings(String userID, boolean matchPartial)
Return an iterator of the key rings associated with the passed in userID.
|
Iterator | getKeyRings(String userID)
Return an iterator of the key rings associated with the passed in userID.
|
PGPSecretKey | getSecretKey(long keyID)
Return the PGP secret key associated with the given key id.
|
PGPSecretKeyRing | getSecretKeyRing(long keyID)
Return the secret key ring which contains the key referred to by keyID.
|
static PGPSecretKeyRingCollection | removeSecretKeyRing(PGPSecretKeyRingCollection ringCollection, PGPSecretKeyRing secretKeyRing)
Return a new collection object containing the contents of this collection with
the passed in secret key ring removed.
|
int | size()
Return the number of rings in this collection.
|
Parameters: in input stream containing data
Throws: IOException if a problem parsinh the base stream occurs PGPException if an object is encountered which isn't a PGPSecretKeyRing
Parameters: ringCollection the collection the ring to be added to. secretKeyRing the key ring to be added.
Returns: a new collection merging the current one with the passed in ring.
Throws: IllegalArgumentException if the keyID for the passed in ring is already present.
Parameters: userID the user ID to be matched. matchPartial if true userID need only be a substring of an actual ID string to match.
Returns: an iterator (possibly empty) of key rings which matched.
Throws: PGPException
Parameters: userID the user ID to be matched.
Returns: an iterator (possibly empty) of key rings which matched.
Throws: PGPException
Parameters: keyID
Returns: the secret key
Throws: PGPException
Parameters: keyID
Returns: the secret key ring
Throws: PGPException
Parameters: ringCollection the collection the ring to be removed from. secretKeyRing the key ring to be removed.
Returns: a new collection merging the current one with the passed in ring.
Throws: IllegalArgumentException if the keyID for the passed in ring is not present.
Returns: size of the collection