C# Класс Org.BouncyCastle.Bcpg.OpenPgp.PgpSecretKeyRing

Holder for a collection of PGP secret keys.
Наследование: PgpKeyRing
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
CopyWithNewPassword ( PgpSecretKeyRing ring, char oldPassPhrase, char newPassPhrase, SymmetricKeyAlgorithmTag newEncAlgorithm, SecureRandom rand ) : PgpSecretKeyRing

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.

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

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.

GetPublicKey ( ) : PgpPublicKey

Return the public key for the master key.

GetSecretKey ( ) : PgpSecretKey

Return the master private key.

GetSecretKey ( long keyId ) : PgpSecretKey
GetSecretKeys ( ) : IEnumerable

Allows enumeration of the secret keys.

InsertSecretKey ( PgpSecretKeyRing secRing, PgpSecretKey secKey ) : PgpSecretKeyRing

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

PgpSecretKeyRing ( Stream inputStream ) : System
PgpSecretKeyRing ( byte encoding ) : System
RemoveSecretKey ( PgpSecretKeyRing secRing, PgpSecretKey secKey ) : PgpSecretKeyRing

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

ReplacePublicKeys ( PgpSecretKeyRing secretRing, PgpPublicKeyRing publicRing ) : PgpSecretKeyRing

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

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

Метод Описание
PgpSecretKeyRing ( IList keys ) : System
PgpSecretKeyRing ( IList keys, IList extraPubKeys ) : System

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

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

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.
public static CopyWithNewPassword ( PgpSecretKeyRing ring, char oldPassPhrase, char newPassPhrase, SymmetricKeyAlgorithmTag newEncAlgorithm, SecureRandom rand ) : PgpSecretKeyRing
ring PgpSecretKeyRing The PgpSecretKeyRing to be copied.
oldPassPhrase char The current password for key.
newPassPhrase char The new password for the key.
newEncAlgorithm SymmetricKeyAlgorithmTag The algorithm to be used for the encryption.
rand SecureRandom Source of randomness.
Результат PgpSecretKeyRing

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

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

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

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

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

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.
public GetExtraPublicKeys ( ) : IEnumerable
Результат IEnumerable

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

Return the public key for the master key.
public GetPublicKey ( ) : PgpPublicKey
Результат PgpPublicKey

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

Return the master private key.
public GetSecretKey ( ) : PgpSecretKey
Результат PgpSecretKey

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

public GetSecretKey ( long keyId ) : PgpSecretKey
keyId long
Результат PgpSecretKey

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

Allows enumeration of the secret keys.
public GetSecretKeys ( ) : IEnumerable
Результат IEnumerable

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

Returns a new key ring with the secret key passed in either added or replacing an existing one with the same key ID.
public static InsertSecretKey ( PgpSecretKeyRing secRing, PgpSecretKey secKey ) : PgpSecretKeyRing
secRing PgpSecretKeyRing The secret key ring to be modified.
secKey PgpSecretKey The secret key to be inserted.
Результат PgpSecretKeyRing

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

public PgpSecretKeyRing ( Stream inputStream ) : System
inputStream Stream
Результат System

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

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

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

Returns a new key ring with the secret key passed in removed from the key ring.
public static RemoveSecretKey ( PgpSecretKeyRing secRing, PgpSecretKey secKey ) : PgpSecretKeyRing
secRing PgpSecretKeyRing The secret key ring to be modified.
secKey PgpSecretKey The secret key to be removed.
Результат PgpSecretKeyRing

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

Replace the public key set on the secret ring with the corresponding key off the public ring.
public static ReplacePublicKeys ( PgpSecretKeyRing secretRing, PgpPublicKeyRing publicRing ) : PgpSecretKeyRing
secretRing PgpSecretKeyRing Secret ring to be changed.
publicRing PgpPublicKeyRing Public ring containing the new public key set.
Результат PgpSecretKeyRing