CryptoSys PKI Toolkit Manual

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

Generate an RSA public/private key pair, saving private key with PBES2 algorithm.

Syntax

[C#]
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]
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
Exponent (Fermat Prime)
iterCount
Iteration count for encrypted private key
password
Password string for encrypted private key
cipherAlg
Block cipher to use for encryption scheme (default = des-ede3-cbc)
hashAlg
Hash function to use in PRF HMAC algorithm (default = hmacWithSHA1)
fileFormat
Format to save file (default=DER binary)
showProgress
Indicate progress in console

Return Value

Zero if successful or non-zero error code

[Contents] [Index]


[HOME]   [NEXT: Rsa.MakeKeys Method (String, String, Int32, Rsa.PublicExponent, Int32, String, Rsa.PbeOptions, Boolean)...]

Copyright © 2004-10 D.I. Management Services Pty Ltd. All rights reserved.