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

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 secret key file in one hit this is the class for you.
Show file Open project: nonorganic/dssnet Class Usage Examples

Private Properties

Property Type Description
PgpSecretKeyRingBundle System

Public Methods

Method Description
AddSecretKeyRing ( PgpSecretKeyRingBundle bundle, PgpSecretKeyRing secretKeyRing ) : PgpSecretKeyRingBundle

Return a new bundle containing the contents of the passed in bundle and the passed in secret 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 secret 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.

GetSecretKey ( long keyId ) : PgpSecretKey

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

GetSecretKeyRing ( long keyId ) : PgpSecretKeyRing

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

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

Build a PgpSecretKeyRingBundle from the passed in input stream.

PgpSecretKeyRingBundle ( byte encoding ) : System
RemoveSecretKeyRing ( PgpSecretKeyRingBundle bundle, PgpSecretKeyRing secretKeyRing ) : PgpSecretKeyRingBundle

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

Private Methods

Method Description
PgpSecretKeyRingBundle ( IDictionary secretRings, IList order ) : System

Method Details

AddSecretKeyRing() public static method

Return a new bundle containing the contents of the passed in bundle and the passed in secret key ring.
If the keyId for the passed in key ring is already present.
public static AddSecretKeyRing ( PgpSecretKeyRingBundle bundle, PgpSecretKeyRing secretKeyRing ) : PgpSecretKeyRingBundle
bundle PgpSecretKeyRingBundle The PgpSecretKeyRingBundle the key ring is to be added to.
secretKeyRing PgpSecretKeyRing The key ring to be added.
return PgpSecretKeyRingBundle

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 secret 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

GetSecretKey() public method

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

GetSecretKeyRing() public method

Return the secret key ring which contains the key referred to by keyId
public GetSecretKeyRing ( long keyId ) : PgpSecretKeyRing
keyId long The ID of the secret key
return PgpSecretKeyRing

PgpSecretKeyRingBundle() public method

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

PgpSecretKeyRingBundle() public method

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

PgpSecretKeyRingBundle() public method

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

RemoveSecretKeyRing() public static method

Return a new bundle containing the contents of the passed in bundle with the passed in secret key ring removed.
If the keyId for the passed in key ring is not present.
public static RemoveSecretKeyRing ( PgpSecretKeyRingBundle bundle, PgpSecretKeyRing secretKeyRing ) : PgpSecretKeyRingBundle
bundle PgpSecretKeyRingBundle The PgpSecretKeyRingBundle the key ring is to be removed from.
secretKeyRing PgpSecretKeyRing The key ring to be removed.
return PgpSecretKeyRingBundle