CryptoSys PKI Pro Manual

Ecc.ReadPrivateKey Method

Read from a file or string containing an EC private key into an "internal" private key string.

Syntax

[C#]
public static StringBuilder ReadPrivateKey(
	string keyFileOrString,
	string password
)
[VB.NET]
Public Shared Function ReadPrivateKey ( _
	keyFileOrString As String, _
	password As String _
) As StringBuilder

Parameters

keyFileOrString
Name of private key file or a PEM String containing the key
password
Password for private key, if encrypted; or "" if not

Return Value

StringBuilder containing an internal representation of the private key; or an empty StringBuilder if error

Remarks

This returns a StringBuilder, not a string, to allow secure wiping. Use sb.ToString() to obtain a string. Use Wipe.String(sb) to clear.

See Also

VB6/C equivalent: ECC_ReadPrivateKey

[Contents] [Index]

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

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