CryptoSys PKI Pro Manual

Rsa.SaveEncPrivateKey Method (String, String, Int32, String, CipherAlgorithm, HashAlgorithm, Rsa.Format)

Save a private key string to a PKCS-8 EncryptedPrivateKeyInfo file using PBES2 algorithm [DEPRECATED].

Syntax

[C#]
public static int SaveEncPrivateKey(
	string outputFile,
	string privateKey,
	int iterationCount,
	string password,
	CipherAlgorithm cipherAlg,
	HashAlgorithm hashAlg,
	Rsa.Format format
)
[VB.NET]
Public Shared Function SaveEncPrivateKey ( _
	outputFile As String, _
	privateKey As String, _
	iterationCount As Integer, _
	password As String, _
	cipherAlg As CipherAlgorithm, _
	hashAlg As HashAlgorithm, _
	format As Rsa.Format _
) As Integer

Parameters

outputFile
Name of file to create
privateKey
Private key in internal format
iterationCount
Iteration count to be used when encrypting file
password
Password string
cipherAlg
Type: CipherAlgorithm
Block cipher to use for encryption scheme [default = des-ede3-cbc]
hashAlg
Type: HashAlgorithm
Hash function to use in PRF HMAC algorithm [default = hmacWithSHA1]
format
Type: Rsa.Format
File format

Return Value

If successful, the return value is zero; otherwise it returns a nonzero error code

See Also

VB6/C equivalent: RSA_SaveEncPrivateKey

[Contents] [Index]

[PREV: Rsa.SaveEncKey Method...]   [Contents]   [Index]   
   [NEXT: Rsa.SaveEncPrivateKey Method (String, String, Int32, String, Rsa.PbeOptions, Rsa.Format)...]

Copyright © 2004-24 D.I. Management Services Pty Ltd. All rights reserved. Generated 2024-09-23T07:52:09Z.