org.bouncycastle.openpgp
Class PGPSecretKeyRingCollection
java.lang.Object
|
+--org.bouncycastle.openpgp.PGPSecretKeyRingCollection
- public class PGPSecretKeyRingCollection
- extends java.lang.Object
Often a PGP key ring file is made up of a succession of master/sub-key key rings.
If you want to read an entire secret key file in one hit this is the class for you.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PGPSecretKeyRingCollection
public PGPSecretKeyRingCollection(byte[] encoding)
throws java.io.IOException,
PGPException
PGPSecretKeyRingCollection
public PGPSecretKeyRingCollection(java.io.InputStream in)
throws java.io.IOException,
PGPException
PGPSecretKeyRingCollection
public PGPSecretKeyRingCollection(java.util.Collection collection)
throws java.io.IOException,
PGPException
getKeyRings
public java.util.Iterator getKeyRings()
- return the secret key rings making up this collection.
getSecretKey
public PGPSecretKey getSecretKey(long keyID)
throws PGPException
- Return the PGP secret key associated with the given key id.
- Parameters:
keyID
- - Returns:
- the secret key
- Throws:
PGPException
-
getSecretKeyRing
public PGPSecretKeyRing getSecretKeyRing(long keyID)
throws PGPException
- Return the secret key ring which contains the key referred to by keyID.
- Parameters:
keyID
- - Returns:
- the secret key ring
- Throws:
PGPException
-
getEncoded
public byte[] getEncoded()
throws java.io.IOException
encode
public void encode(java.io.OutputStream outStream)
throws java.io.IOException