CryptoSys PKI Pro Manual

Rsa.SaveEncPrivateKey(String, String, Int32, String, Rsa.PbeOptions, Rsa.Format) Method

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

Syntax

[C#]
public static int SaveEncPrivateKey(
   string outputFile,
   string privateKey,
   int iterationCount,
   string password,
   Rsa.PbeOptions pbeOption,
   Rsa.Format format 
)
[VB]
Public Shared Function SaveEncPrivateKey (
   outputFile As String,
   privateKey As String,
   iterationCount As Integer,
   password As String,
   pbeOption As Rsa.PbeOptions,
   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
pbeOption  Rsa.PbeOptions
Type of password-based encryption to use [default = pbeWithSHAAnd3-KeyTripleDES-CBC]
format  Rsa.Format
File format

Return Value

Int32
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.SaveEncPrivateKey(String, String, Int32, String, CipherAlgorithm, HashAlgorithm, Rsa.Format) Method...]   [Contents]   [Index]   
   [NEXT: Rsa.SavePrivateKeyInfo Method...]

Copyright © 2004-26 D.I. Management Services Pty Ltd t/a CryptoSys. All rights reserved. Generated 2026-09-21T05:59:39Z.