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

Often a PGP key ring file is made up of a succession of master/sub-key key rings. If you want to read an entire public key file in one hit this is the class for you.
Mostra file Open project: nonorganic/dssnet Class Usage Examples

Private Properties

Property Type Description
PgpPublicKeyRingBundle System

Public Methods

Method Description
AddPublicKeyRing ( PgpPublicKeyRingBundle bundle, PgpPublicKeyRing publicKeyRing ) : PgpPublicKeyRingBundle

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

Contains ( long keyID ) : bool

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

Encode ( Stream outStr ) : void
GetEncoded ( ) : byte[]
GetKeyRings ( ) : IEnumerable

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

GetKeyRings ( string userId ) : IEnumerable

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

GetKeyRings ( string userId, bool matchPartial ) : IEnumerable

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

GetKeyRings ( string userId, bool matchPartial, bool ignoreCase ) : IEnumerable

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

GetPublicKey ( long keyId ) : PgpPublicKey

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

GetPublicKeyRing ( long keyId ) : PgpPublicKeyRing

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

PgpPublicKeyRingBundle ( IEnumerable e ) : System
PgpPublicKeyRingBundle ( Stream inputStream ) : System

Build a PgpPublicKeyRingBundle from the passed in input stream.

PgpPublicKeyRingBundle ( byte encoding ) : System
RemovePublicKeyRing ( PgpPublicKeyRingBundle bundle, PgpPublicKeyRing publicKeyRing ) : PgpPublicKeyRingBundle

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

Private Methods

Method Description
PgpPublicKeyRingBundle ( IDictionary pubRings, IList order ) : System

Method Details

AddPublicKeyRing() public static method

Return a new bundle containing the contents of the passed in bundle and the passed in public key ring.
If the keyId for the passed in key ring is already present.
public static AddPublicKeyRing ( PgpPublicKeyRingBundle bundle, PgpPublicKeyRing publicKeyRing ) : PgpPublicKeyRingBundle
bundle PgpPublicKeyRingBundle The PgpPublicKeyRingBundle the key ring is to be added to.
publicKeyRing PgpPublicKeyRing The key ring to be added.
return PgpPublicKeyRingBundle

Contains() public method

Return true if a key matching the passed in key ID is present, false otherwise.
public Contains ( long keyID ) : bool
keyID long key ID to look for.
return bool

Encode() public method

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

GetEncoded() public method

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

GetKeyRings() public method

Allow enumeration of the public key rings making up this collection.
public GetKeyRings ( ) : IEnumerable
return IEnumerable

GetKeyRings() public method

Allow enumeration of the key rings associated with the passed in userId.
public GetKeyRings ( string userId ) : IEnumerable
userId string The user ID to be matched.
return IEnumerable

GetKeyRings() public method

Allow enumeration of the key rings associated with the passed in userId.
public GetKeyRings ( string userId, bool matchPartial ) : IEnumerable
userId string The user ID to be matched.
matchPartial bool If true, userId need only be a substring of an actual ID string to match.
return IEnumerable

GetKeyRings() public method

Allow enumeration of the key rings associated with the passed in userId.
public GetKeyRings ( string userId, bool matchPartial, bool ignoreCase ) : IEnumerable
userId string The user ID to be matched.
matchPartial bool If true, userId need only be a substring of an actual ID string to match.
ignoreCase bool If true, case is ignored in user ID comparisons.
return IEnumerable

GetPublicKey() public method

Return the PGP public key associated with the given key id.
public GetPublicKey ( long keyId ) : PgpPublicKey
keyId long The ID of the public key to return.
return PgpPublicKey

GetPublicKeyRing() public method

Return the public key ring which contains the key referred to by keyId
public GetPublicKeyRing ( long keyId ) : PgpPublicKeyRing
keyId long key ID to match against
return PgpPublicKeyRing

PgpPublicKeyRingBundle() public method

public PgpPublicKeyRingBundle ( IEnumerable e ) : System
e IEnumerable
return System

PgpPublicKeyRingBundle() public method

Build a PgpPublicKeyRingBundle from the passed in input stream.
If a problem parsing the stream occurs. If an object is encountered which isn't a PgpPublicKeyRing.
public PgpPublicKeyRingBundle ( Stream inputStream ) : System
inputStream Stream Input stream containing data.
return System

PgpPublicKeyRingBundle() public method

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

RemovePublicKeyRing() public static method

Return a new bundle containing the contents of the passed in bundle with the passed in public key ring removed.
If the keyId for the passed in key ring is not present.
public static RemovePublicKeyRing ( PgpPublicKeyRingBundle bundle, PgpPublicKeyRing publicKeyRing ) : PgpPublicKeyRingBundle
bundle PgpPublicKeyRingBundle The PgpPublicKeyRingBundle the key ring is to be removed from.
publicKeyRing PgpPublicKeyRing The key ring to be removed.
return PgpPublicKeyRingBundle