Opc.Ua.Security.Certificates
ExportPrivateKeyAsPEM Method



Opc.Ua.Security.Certificates Namespace > PEMWriter Class : ExportPrivateKeyAsPEM Method
Returns a byte array containing the private key in PEM format.
Syntax
'Declaration
 
Public Shared Function ExportPrivateKeyAsPEM( _
   ByVal certificate As X509Certificate2, _
   Optional ByVal password As String _
) As Byte()
'Usage
 
Dim certificate As X509Certificate2
Dim password As String
Dim value() As Byte
 
value = PEMWriter.ExportPrivateKeyAsPEM(certificate, password)
public static byte[] ExportPrivateKeyAsPEM( 
   X509Certificate2 certificate,
   string password
)
public:
static array<byte>^ ExportPrivateKeyAsPEM( 
   X509Certificate2^ certificate,
   String^ password
) 

Parameters

certificate
password
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

PEMWriter Class
PEMWriter Members