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: CryptoSysPKIAssembly: 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
)
<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 RsaPublicExponent,
iterCount As Integer,
password As String,
cipherAlg As CipherAlgorithm,
hashAlg As HashAlgorithm,
fileFormat As RsaFormat,
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 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
Int32Zero if successful or non-zero
error code
RemarksThe private key is saved in encrypted PKCS#8 format using
the PBES2 encryption scheme from PKCS#5 with key derivation function PBKDF2.
See Also