Replace the passed the public key on the passed in secret key.
Namespace: Org.BouncyCastle.Bcpg.OpenPgpAssembly: ITextSharp (in ITextSharp.dll) Version: 4.1.6.0
Syntax
| C# |
|---|
public static PgpSecretKey ReplacePublicKey( PgpSecretKey secretKey, PgpPublicKey publicKey ) |
| Visual Basic |
|---|
Public Shared Function ReplacePublicKey ( _ secretKey As PgpSecretKey, _ publicKey As PgpPublicKey _ ) As PgpSecretKey |
| Visual C++ |
|---|
public: static PgpSecretKey^ ReplacePublicKey( PgpSecretKey^ secretKey, PgpPublicKey^ publicKey ) |
Parameters
- secretKey
- Type: Org.BouncyCastle.Bcpg.OpenPgp..::..PgpSecretKey
Secret key to change.
- publicKey
- Type: Org.BouncyCastle.Bcpg.OpenPgp..::..PgpPublicKey
New public key.
Return Value
A new secret key.
Exceptions
| Exception | Condition |
|---|---|
| System..::..ArgumentException | If KeyId's do not match. |