CryptoSys PKI Toolkit Manual

Rsa.ReadPrivateKeyFromPFX Method

Reads a private key directly from an encrypted PFX/PKCS-12 file into an "internal" private key string.

Syntax

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

Parameters

pfxFile
PKCS-12 filename
password
Password for PFX file

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. Use sb.ToString() to obtain a string.

Examples (VB.NET)

See Example1

See Also

VB6/C equivalent: RSA_ReadPrivateKeyFromPFX

[Contents] [Index]

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

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