Return a copy of the passed in secret key, encrypted using a new password and the passed in algorithm.

Namespace: Org.BouncyCastle.Bcpg.OpenPgp
Assembly: ITextSharp (in ITextSharp.dll) Version: 4.1.6.0

Syntax

C#
public static PgpSecretKey CopyWithNewPassword(
	PgpSecretKey key,
	char[] oldPassPhrase,
	char[] newPassPhrase,
	SymmetricKeyAlgorithmTag newEncAlgorithm,
	SecureRandom rand
)
Visual Basic
Public Shared Function CopyWithNewPassword ( _
	key As PgpSecretKey, _
	oldPassPhrase As Char(), _
	newPassPhrase As Char(), _
	newEncAlgorithm As SymmetricKeyAlgorithmTag, _
	rand As SecureRandom _
) As PgpSecretKey
Visual C++
public:
static PgpSecretKey^ CopyWithNewPassword(
	PgpSecretKey^ key, 
	array<wchar_t>^ oldPassPhrase, 
	array<wchar_t>^ newPassPhrase, 
	SymmetricKeyAlgorithmTag newEncAlgorithm, 
	SecureRandom^ rand
)

Parameters

key
Type: Org.BouncyCastle.Bcpg.OpenPgp..::..PgpSecretKey
The PgpSecretKey to be copied.
oldPassPhrase
Type: array<System..::..Char>[]()[][]
The current password for the key.
newPassPhrase
Type: array<System..::..Char>[]()[][]
The new password for the key.
newEncAlgorithm
Type: Org.BouncyCastle.Bcpg..::..SymmetricKeyAlgorithmTag
The algorithm to be used for the encryption.
rand
Type: Org.BouncyCastle.Security..::..SecureRandom
Source of randomness.

See Also