CryptoSys PKI Pro Manual

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

Generate an RSA public/private key pair.

Syntax

[C#]
public static int MakeKeys(
	string publicKeyFile,
	string privateKeyFile,
	string password,
	int bits,
	Rsa.PublicExponent exponent,
	Rsa.PbeOptions pbes,
	string paramString,
	Rsa.Format fileFormat,
	bool showProgress
)
[VB.NET]
Public Shared Function MakeKeys ( _
	publicKeyFile As String, _
	privateKeyFile As String, _
	password As String, _
	bits As Integer, _
	exponent As Rsa.PublicExponent, _
	pbes As Rsa.PbeOptions, _
	paramString As String, _
	fileFormat As Rsa.Format, _
	showProgress As Boolean _
) As Integer

Parameters

publicKeyFile
Output filename for public key
privateKeyFile
Output filename for (encrypted) private key
password
Password for encrypted private key
bits
Required key modulus size in bits (min 96)
exponent
Type: Rsa.PublicExponent
Exponent [default=65537=F4]
pbes
Type: Rsa.PbeOptions
Encryption scheme to encrypt private key [default=pbeWithSHAAnd3-KeyTripleDES-CBC from PKCS#12]
paramString
Optional parameters. A set of attribute name=value pairs separated by a semicolon ";" (see remarks)
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

Valid name-value pairs for paramString are:

count=integerTo set the iteration count used in the PBKDF2 method, e.g. "count=5000;" [default=2048].
prf=hmac-nameTo change the HMAC algorithm used in the PBKDF2 method, e.g. "prf=hmacwithSHA256;" [default=hmacwithSHA1].
Valid values for hmac-name are {hmacWithSHA1|hmacWithSHA224|hmacWithSHA256|hmacWithSHA384|hmacWithSHA512}.

See Also

VB6/C equivalent: RSA_MakeKeysXtd

[Contents] [Index]

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

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