Rsa.ReadPrivateKey Method
Read from a file or string containing a private key into an "internal" private key string.
Syntax
[C#]
public static StringBuilder ReadPrivateKey(
string privateKeyFile,
string password
)
[VB.NET]
Public Shared Function ReadPrivateKey ( _
privateKeyFile As String, _
password As String _
) As StringBuilder
Parameters
- privateKeyFile
- Name of private key file or a PEM String containing the key
- password
- Password for private key, if encrypted
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.
See Also
VB6/C equivalent: RSA_ReadAnyPrivateKey
[Contents] [Index]