CryptoSys PKI Pro Manual

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

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

Return Value

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 Method (String, String, Int32, Rsa.PublicExponent, Int32, String, Rsa.PbeOptions, Boolean, Byte)...]

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