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

PgpSecretKeyRingBundle

public class PgpSecretKeyRingBundle
public int Count { get; }

Return the number of rings in this collection.

public PgpSecretKeyRingBundle(byte[] encoding)

public PgpSecretKeyRingBundle(Stream inputStream)

Build a PgpSecretKeyRingBundle from the passed in input stream.

Return a new bundle containing the contents of the passed in bundle and the passed in secret key ring.

Return a new bundle containing the contents of the passed in bundle with the passed in secret key ring removed.

public bool Contains(long keyID)

Return true if a key matching the passed in key ID is present, false otherwise.

public void Encode(Stream outStr)

public byte[] GetEncoded()

Allow enumeration of the secret key rings making up this collection.

public IEnumerable<PgpSecretKeyRing> GetKeyRings(string userId)

Allow enumeration of the key rings associated with the passed in userId.

public IEnumerable<PgpSecretKeyRing> GetKeyRings(string userId, bool matchPartial)

Allow enumeration of the key rings associated with the passed in userId.

public IEnumerable<PgpSecretKeyRing> GetKeyRings(string userID, bool matchPartial, bool ignoreCase)

Allow enumeration of the key rings associated with the passed in userId.

public PgpSecretKey GetSecretKey(long keyId)

Return the PGP secret key associated with the given key id.

Return the secret key ring which contains the key referred to by keyId