CryptoSys PKI Toolkit Manual

Rsa.SaveEncPrivateKey Method (String, String, Int32, String, Rsa.PbeOptions, Rsa.Format)

Saves a private key string to a PKCS-8 EncryptedPrivateKeyInfo file

Syntax

[C#]
public static int SaveEncPrivateKey(
	string outputFile,
	string privateKey,
	int iterationCount,
	string password,
	Rsa.PbeOptions pbeOption,
	Rsa.Format format
)
[VB.NET]
Public Shared Function SaveEncPrivateKey ( _
	outputFile As String, _
	privateKey As String, _
	iterationCount As Integer, _
	password As String, _
	pbeOption As Rsa.PbeOptions, _
	format As Rsa.Format _
) As Integer

Parameters

outputFile
Name of file to create
privateKey
Private key in internal format
iterationCount
Iteration count to be used when encrypting file
password
Password string
pbeOption
Type of password-based encryption to use (default = pbeWithSHAAnd3-KeyTripleDES-CBC)
format
File format

Return Value

If successful, the return value is zero; otherwise it returns an error code

[Contents] [Index]


[HOME]   [NEXT: Rsa.SavePrivateKeyInfo Method...]

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