Create a PgpPublicKey from the passed in lightweight one.
Namespace: Org.BouncyCastle.Bcpg.OpenPgpAssembly: ITextSharp (in ITextSharp.dll) Version: 4.1.6.0
Syntax
C# |
---|
public PgpPublicKey( PublicKeyAlgorithmTag algorithm, AsymmetricKeyParameter pubKey, DateTime time ) |
Visual Basic |
---|
Public Sub New ( _ algorithm As PublicKeyAlgorithmTag, _ pubKey As AsymmetricKeyParameter, _ time As DateTime _ ) |
Visual C++ |
---|
public: PgpPublicKey( PublicKeyAlgorithmTag algorithm, AsymmetricKeyParameter^ pubKey, DateTime time ) |
Parameters
- algorithm
- Type: Org.BouncyCastle.Bcpg..::..PublicKeyAlgorithmTag
Asymmetric algorithm type representing the public key.
- pubKey
- Type: Org.BouncyCastle.Crypto..::..AsymmetricKeyParameter
Actual public key to associate.
- time
- Type: System..::..DateTime
Date of creation.
Remarks
Note: the time passed in affects the value of the key's keyId, so you probably only want
to do this once for a lightweight key, or make sure you keep track of the time you used.
Exceptions
Exception | Condition |
---|---|
System..::..ArgumentException | If pubKey is not public. |
Org.BouncyCastle.Bcpg.OpenPgp..::..PgpException | On key creation problem. |