C# Class Org.BouncyCastle.Bcpg.OpenPgp.PgpPublicKeyRing

Class to hold a single master public key and its subkeys.

Often PGP keyring files consist of multiple master keys, if you are trying to process or construct one of these you should use the PgpPublicKeyRingBundle class.

Inheritance: PgpKeyRing, IPgpPublicKeyRing
ファイルを表示 Open project: red-gate/iTextSharp-4.1.6 Class Usage Examples

Public Methods

Method Description
Encode ( Stream outStr ) : void
GetEncoded ( ) : byte[]
GetPublicKey ( ) : PgpPublicKey

Return the first public key in the ring.

GetPublicKey ( long keyId ) : PgpPublicKey

Return the public key referred to by the passed in key ID if it is present.

GetPublicKeys ( ) : IEnumerable

Allows enumeration of all the public keys.

InsertPublicKey ( PgpPublicKeyRing pubRing, PgpPublicKey pubKey ) : PgpPublicKeyRing

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

PgpPublicKeyRing ( Stream inputStream ) : System
PgpPublicKeyRing ( byte encoding ) : System
RemovePublicKey ( PgpPublicKeyRing pubRing, PgpPublicKey pubKey ) : PgpPublicKeyRing

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

Private Methods

Method Description
PgpPublicKeyRing ( ArrayList pubKeys ) : System

Method Details

Encode() public method

public Encode ( Stream outStr ) : void
outStr Stream
return void

GetEncoded() public method

public GetEncoded ( ) : byte[]
return byte[]

GetPublicKey() public method

Return the first public key in the ring.
public GetPublicKey ( ) : PgpPublicKey
return PgpPublicKey

GetPublicKey() public method

Return the public key referred to by the passed in key ID if it is present.
public GetPublicKey ( long keyId ) : PgpPublicKey
keyId long
return PgpPublicKey

GetPublicKeys() public method

Allows enumeration of all the public keys.
public GetPublicKeys ( ) : IEnumerable
return IEnumerable

InsertPublicKey() public static method

Returns a new key ring with the public key passed in either added or replacing an existing one.
public static InsertPublicKey ( PgpPublicKeyRing pubRing, PgpPublicKey pubKey ) : PgpPublicKeyRing
pubRing PgpPublicKeyRing The public key ring to be modified.
pubKey PgpPublicKey The public key to be inserted.
return PgpPublicKeyRing

PgpPublicKeyRing() public method

public PgpPublicKeyRing ( Stream inputStream ) : System
inputStream Stream
return System

PgpPublicKeyRing() public method

public PgpPublicKeyRing ( byte encoding ) : System
encoding byte
return System

RemovePublicKey() public static method

Returns a new key ring with the public key passed in removed from the key ring.
public static RemovePublicKey ( PgpPublicKeyRing pubRing, PgpPublicKey pubKey ) : PgpPublicKeyRing
pubRing PgpPublicKeyRing The public key ring to be modified.
pubKey PgpPublicKey The public key to be removed.
return PgpPublicKeyRing