CryptoSys PKI Pro Manual

Ecc.SaveEncKey Method

Save an internal EC private key string to an encrypted private key file.

Syntax

[C#]
public static int SaveEncKey(
	string outputFile,
	string internalKey,
	string password,
	Ecc.PbeScheme pbes,
	string paramString,
	Ecc.Format fileFormat
)
[VB.NET]
Public Shared Function SaveEncKey ( _
	outputFile As String, _
	internalKey As String, _
	password As String, _
	pbes As Ecc.PbeScheme, _
	paramString As String, _
	fileFormat As Ecc.Format _
) As Integer

Parameters

outputFile
name of key file to be created
internalKey
the private key in an internal key string
password
the password to be used for the encrypted key file
pbes
Type: Ecc.PbeScheme
Password-based encryption scheme to encrypt private key [default = pbeWithSHAAnd3-KeyTripleDES-CBC]
paramString
Optional parameters. A set of attribute name=value pairs separated by a semicolon ";" (see remarks). Set as "" for defaults.
fileFormat
Type: Ecc.Format
Format to save file [default = DER binary]

Return Value

Zero if successful or non-zero error code

Remarks

Valid name-value pairs for paramString are:

count=integerTo set the iteration count used in the PBKDF2 method, e.g. "count=5000;" [default=2048].
prf=hmac-nameTo change the HMAC algorithm used in the PBKDF2 method, e.g. "prf=hmacwithSHA256;" [default=hmacwithSHA1].
Valid values for hmac-name are {hmacWithSHA1|hmacWithSHA224|hmacWithSHA256|hmacWithSHA384|hmacWithSHA512}.

See Also

VB6/C equivalent: ECC_SaveEncKey

[Contents] [Index]

[PREV: Ecc.ReadPublicKey Method...]   [Contents]   [Index]   
   [NEXT: Ecc.SaveKey Method...]

Copyright © 2004-24 D.I. Management Services Pty Ltd. All rights reserved. Generated 2024-09-23T07:52:09Z.