Click or drag to resize

RsaMakeKeys(String, String, Int32, RsaPublicExponent, Int32, String, CipherAlgorithm, HashAlgorithm, RsaFormat, Boolean) Method

Note: This API is now obsolete.

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

Namespace: CryptoSysPKI
Assembly: diCrSysPKINet (in diCrSysPKINet.dll) Version: 23.0.0.30549 (23.1.0.0)
Syntax
[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,
	RsaPublicExponent exponent,
	int iterCount,
	string password,
	CipherAlgorithm cipherAlg,
	HashAlgorithm hashAlg,
	RsaFormat fileFormat,
	bool showProgress
)

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  RsaPublicExponent
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  RsaFormat
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