CryptoSys PKI Pro Manual

Rsa.MakeKeys(String, String, Int32, Rsa.PublicExponent, Int32, String, CipherAlgorithm, HashAlgorithm, Rsa.Format, Boolean) Method

Generate an RSA public/private key pair with extended options for encrypting private key [DEPRECATED].

Syntax

[C#]
[ObsoleteAttribute( "Use Rsa.MakeKeys( String, String, String, Int32, Rsa.PublicExponent, Rsa.PbeOptions, String, Rsa.Format, Boolean ) instead", false )]
public static int MakeKeys(
   string publicKeyFile,
   string privateKeyFile,
   int bits,
   Rsa.PublicExponent exponent,
   int iterCount,
   string password,
   CipherAlgorithm cipherAlg,
   HashAlgorithm hashAlg,
   Rsa.Format fileFormat,
   bool showProgress 
)
[VB]
<ObsoleteAttribute( "Use Rsa.MakeKeys( String, String, String, Int32, Rsa.PublicExponent, Rsa.PbeOptions, String, Rsa.Format, Boolean ) instead", false )>
Public Shared Function MakeKeys (
   publicKeyFile As String,
   privateKeyFile As String,
   bits As Integer,
   exponent As Rsa.PublicExponent,
   iterCount As Integer,
   password As String,
   cipherAlg As CipherAlgorithm,
   hashAlg As HashAlgorithm,
   fileFormat As Rsa.Format,
   showProgress As Boolean 
) As Integer

Parameters

publicKeyFile  String
Output filename for public key
privateKeyFile  String
Output filename for (encrypted) private key
bits  Int32
Required key modulus size in bits (min 96)
exponent  Rsa.PublicExponent
Exponent (Fermat Prime)
iterCount  Int32
Iteration count for encrypted private key
password  String
Password string for encrypted private key
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]
fileFormat  Rsa.Format
Format to save file [default = DER binary]
showProgress  Boolean
Indicate progress in console

Return Value

Int32
Zero if successful or non-zero error code

Remarks

The private key is saved in encrypted PKCS#8 format using the PBES2 encryption scheme from PKCS#5 with key derivation function PBKDF2.

See Also

VB6/C equivalent: RSA_MakeKeys

[Contents] [Index]

[PREV: Rsa.KeyValue Method...]   [Contents]   [Index]   
   [NEXT: Rsa.MakeKeys(String, String, Int32, Rsa.PublicExponent, Int32, String, Rsa.PbeOptions, Boolean, Byte) Method...]

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