org.bouncycastle.openpgp

Class PGPSecretKeyRing


public class PGPSecretKeyRing
extends java.lang.Object

Holder for a collection of PGP secret keys.

Constructor Summary

PGPSecretKeyRing(InputStream in)
PGPSecretKeyRing(byte[] encoding)

Method Summary

void
encode(OutputStream outStream)
byte[]
getEncoded()
PGPPublicKey
getPublicKey()
Return the public key for the master key.
PGPSecretKey
getSecretKey()
Return the master private key.
PGPSecretKey
getSecretKey(long keyId)
Iterator
getSecretKeys()
Return an iterator containing all the secret keys.

Constructor Details

PGPSecretKeyRing

public PGPSecretKeyRing(InputStream in)
            throws IOException,
                   PGPException


PGPSecretKeyRing

public PGPSecretKeyRing(byte[] encoding)
            throws IOException,
                   PGPException

Method Details

encode

public void encode(OutputStream outStream)
            throws IOException


getEncoded

public byte[] getEncoded()
            throws IOException


getPublicKey

public PGPPublicKey getPublicKey()
Return the public key for the master key.

Returns:
PGPPublicKey


getSecretKey

public PGPSecretKey getSecretKey()
Return the master private key.

Returns:
PGPSecretKey


getSecretKey

public PGPSecretKey getSecretKey(long keyId)


getSecretKeys

public Iterator getSecretKeys()
Return an iterator containing all the secret keys.

Returns:
Iterator