Class PgpObjectFactory
- Namespace
- Org.BouncyCastle.Bcpg.OpenPgp
- Assembly
- BouncyCastle.Cryptography.dll
public class PgpObjectFactory
- Inheritance
-
PgpObjectFactory
- Inherited Members
Remarks
General class for reading a PGP object stream.
Note: if this class finds a PgpPublicKey or a PgpSecretKey it will create a PgpPublicKeyRing, or a PgpSecretKeyRing for each key found. If all you are trying to do is read a key ring file use either PgpPublicKeyRingBundle or PgpSecretKeyRingBundle.
Constructors
PgpObjectFactory(byte[])
public PgpObjectFactory(byte[] bytes)
Parameters
bytesbyte[]
PgpObjectFactory(Stream)
public PgpObjectFactory(Stream inputStream)
Parameters
inputStreamStream
Methods
AllPgpObjects()
Return all available objects in a list.
public IList<PgpObject> AllPgpObjects()
Returns
FilterPgpObjects<T>()
Read all available objects, returning only those that are assignable to the specified type.
public IList<T> FilterPgpObjects<T>() where T : PgpObject
Returns
Type Parameters
T
NextPgpObject()
Return the next object in the stream, or null if the end is reached.
public PgpObject NextPgpObject()
Returns
Exceptions
- IOException
On a parse error