CryptoSys PKI Pro Manual

Rsa.ReadPrivateKeyFromPFX Method

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

Syntax

[C#]
[ObsoleteAttribute( "Use Rsa.ReadPrivateKey() instead", false )]
public static StringBuilder ReadPrivateKeyFromPFX(
   string pfxFile,
   string password 
)
[VB]
<ObsoleteAttribute( "Use Rsa.ReadPrivateKey() instead", false )>
Public Shared Function ReadPrivateKeyFromPFX (
   pfxFile As String,
   password As String 
) As StringBuilder

Parameters

pfxFile  String
PKCS-12 filename
password  String
Password for PFX file

Return Value

StringBuilder
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.

See Also

VB6/C equivalent: RSA_ReadPrivateKeyFromPFX

[Contents] [Index]

[PREV: Rsa.ReadPrivateKey Method...]   [Contents]   [Index]   
   [NEXT: Rsa.ReadPrivateKeyInfo Method...]

Copyright © 2004-26 D.I. Management Services Pty Ltd t/a CryptoSys. All rights reserved. Generated 2026-09-21T05:59:39Z.