CryptoSys PKI Pro Manual

Rsa.GetPrivateKeyFromPFX Method

Extract an encrypted private key from a PKCS-12 PKCS8ShroudedKeyBag, saving the output directly as a new file.

Syntax

[C#]
public static int GetPrivateKeyFromPFX(
   string outputFile,
   string pfxFile 
)
[VB]
Public Shared Function GetPrivateKeyFromPFX (
   outputFile As String,
   pfxFile As String 
) As Integer

Parameters

outputFile  String
Name of new file to create
pfxFile  String
PKCS-12 filename

Return Value

Int32
If successful, it returns the number of bytes written to the output file; otherwise it returns a negative error code

See Also

VB6/C equivalent: RSA_GetPrivateKeyFromPFX

[Contents] [Index]

[PREV: Rsa.FromXMLString(String, Rsa.XmlOptions) Method...]   [Contents]   [Index]   
   [NEXT: Rsa.GetPublicKeyFromCert Method...]

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