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

PgpSecretKeyRing

public class PgpSecretKeyRing : PgpKeyRing
public PgpSecretKeyRing(byte[] encoding)

public PgpSecretKeyRing(Stream inputStream)

public static PgpSecretKeyRing CopyWithNewPassword(PgpSecretKeyRing ring, char[] oldPassPhrase, char[] newPassPhrase, SymmetricKeyAlgorithmTag newEncAlgorithm, SecureRandom rand)

Return a copy of the passed in secret key ring, with the master key and sub keys encrypted using a new password and the passed in algorithm.

Returns a new key ring with the secret key passed in either added or replacing an existing one with the same key ID.

Returns a new key ring with the secret key passed in removed from the key ring.

Replace the public key set on the secret ring with the corresponding key off the public ring.

public void Encode(Stream outStr)

public byte[] GetEncoded()

Return an iterator of the public keys in the secret key ring that have no matching private key. At the moment only personal certificate data appears in this fashion.

Return the public key for the master key.

Return the master private key.

public PgpSecretKey GetSecretKey(long keyId)

Allows enumeration of the secret keys.