C# Класс 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.

Наследование: PgpKeyRing, IPgpPublicKeyRing
Показать файл Открыть проект Примеры использования класса

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

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

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

Метод Описание
PgpPublicKeyRing ( ArrayList pubKeys ) : System

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

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

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

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

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

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

Return the first public key in the ring.
public GetPublicKey ( ) : PgpPublicKey
Результат PgpPublicKey

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

Return the public key referred to by the passed in key ID if it is present.
public GetPublicKey ( long keyId ) : PgpPublicKey
keyId long
Результат PgpPublicKey

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

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

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

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

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

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

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

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

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

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