<PackageReference Include="BouncyCastle.Cryptography" Version="2.7.0" />

Org.BouncyCastle.Bcpg.OpenPgp.PgpObjectFactory

public class PgpObjectFactory
public PgpObjectFactory(Stream inputStream)

public PgpObjectFactory(byte[] bytes)

Return all available objects in a list.

public IList<T> FilterPgpObjects<T>() where T : PgpObject

Read all available objects, returning only those that are assignable to the specified type.

Return the next object in the stream, or null if the end is reached.

If set to true, the object factory will throw an IOException if it encounters an unknown packet with a packet tag within the critical range (0 - 39).