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

General class to handle JCA key pairs and convert them into OpenPGP ones.

A word for the unwary, the KeyId for an OpenPGP public key is calculated from a hash that includes the time of creation, if you pass a different date to the constructor below with the same public private key pair the KeyIs will not be the same as for previous generations of the key, so ideally you only want to do this once.

Show file Open project: nonorganic/dssnet Class Usage Examples

Public Methods

Method Description
PgpKeyPair ( PgpPublicKey pub, PgpPrivateKey priv ) : System

Create a key pair from a PgpPrivateKey and a PgpPublicKey.

PgpKeyPair ( PublicKeyAlgorithmTag algorithm, AsymmetricCipherKeyPair keyPair, System.DateTime time ) : System
PgpKeyPair ( PublicKeyAlgorithmTag algorithm, AsymmetricKeyParameter pubKey, AsymmetricKeyParameter privKey, System.DateTime time ) : System

Method Details

PgpKeyPair() public method

Create a key pair from a PgpPrivateKey and a PgpPublicKey.
public PgpKeyPair ( PgpPublicKey pub, PgpPrivateKey priv ) : System
pub PgpPublicKey The public key.
priv PgpPrivateKey The private key.
return System

PgpKeyPair() public method

public PgpKeyPair ( PublicKeyAlgorithmTag algorithm, AsymmetricCipherKeyPair keyPair, System.DateTime time ) : System
algorithm PublicKeyAlgorithmTag
keyPair Org.BouncyCastle.Crypto.AsymmetricCipherKeyPair
time System.DateTime
return System

PgpKeyPair() public method

public PgpKeyPair ( PublicKeyAlgorithmTag algorithm, AsymmetricKeyParameter pubKey, AsymmetricKeyParameter privKey, System.DateTime time ) : System
algorithm PublicKeyAlgorithmTag
pubKey Org.BouncyCastle.Crypto.AsymmetricKeyParameter
privKey Org.BouncyCastle.Crypto.AsymmetricKeyParameter
time System.DateTime
return System