C# Класс 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.
Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание
PgpSecretKeyRingBundle System

Открытые методы

Метод Описание
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.

Приватные методы

Метод Описание
PgpSecretKeyRingBundle ( IDictionary secretRings, IList order ) : System

Описание методов

AddSecretKeyRing() публичный статический Метод

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.
Результат PgpSecretKeyRingBundle

Contains() публичный Метод

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.
Результат bool

Encode() публичный Метод

public Encode ( Stream outStr ) : void
outStr Stream
Результат void

GetEncoded() публичный Метод

public GetEncoded ( ) : byte[]
Результат byte[]

GetKeyRings() публичный Метод

Allow enumeration of the secret key rings making up this collection.
public GetKeyRings ( ) : IEnumerable
Результат IEnumerable

GetKeyRings() публичный Метод

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.
Результат IEnumerable

GetKeyRings() публичный Метод

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.
Результат IEnumerable

GetKeyRings() публичный Метод

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.
Результат IEnumerable

GetSecretKey() публичный Метод

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.
Результат PgpSecretKey

GetSecretKeyRing() публичный Метод

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
Результат PgpSecretKeyRing

PgpSecretKeyRingBundle() публичный Метод

public PgpSecretKeyRingBundle ( IEnumerable e ) : System
e IEnumerable
Результат System

PgpSecretKeyRingBundle() публичный Метод

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.
Результат System

PgpSecretKeyRingBundle() публичный Метод

public PgpSecretKeyRingBundle ( byte encoding ) : System
encoding byte
Результат System

RemoveSecretKeyRing() публичный статический Метод

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.
Результат PgpSecretKeyRingBundle