Rsa.SaveEncPrivateKey(String, String, Int32, String, CipherAlgorithm, HashAlgorithm, Rsa.Format) Method
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]
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 String
- Name of file to create
- privateKey String
- Private key in internal format
- iterationCount Int32
- Iteration count to be used when encrypting file
- password String
- Password string
- cipherAlg CipherAlgorithm
- Block cipher to use for encryption scheme [default = des-ede3-cbc]
- hashAlg HashAlgorithm
- Hash function to use in PRF HMAC algorithm [default = hmacWithSHA1]
- format Rsa.Format
- File format
Return Value
Int32If successful, the return value is zero; otherwise it returns a nonzero
error code
See Also
VB6/C equivalent: RSA_SaveEncPrivateKey
[Contents] [Index]