Create a PgpPublicKey from the passed in lightweight one.

Namespace: Org.BouncyCastle.Bcpg.OpenPgp
Assembly: 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

ExceptionCondition
System..::..ArgumentExceptionIf pubKey is not public.
Org.BouncyCastle.Bcpg.OpenPgp..::..PgpExceptionOn key creation problem.

See Also