Click or drag to resize

RsaSaveEncPrivateKey(String, String, Int32, String, CipherAlgorithm, HashAlgorithm, RsaFormat) Method

Save a private key string to a PKCS-8 EncryptedPrivateKeyInfo file using PBES2 algorithm [DEPRECATED].

Namespace: CryptoSysPKI
Assembly: diCrSysPKINet (in diCrSysPKINet.dll) Version: 23.0.0.30549 (23.1.0.0)
Syntax
public static int SaveEncPrivateKey(
	string outputFile,
	string privateKey,
	int iterationCount,
	string password,
	CipherAlgorithm cipherAlg,
	HashAlgorithm hashAlg,
	RsaFormat format
)

Parameters

outputFile  String
Name of file to create
privateKey  String
Private key in internal format
iterationCount  Int32
Iteration count to be used when encrypting file
password  String
Password string
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]
format  RsaFormat
File format

Return Value

Int32
If successful, the return value is zero; otherwise it returns a nonzero error code
See Also