Saves the CertificateStore as a PFX encoded file.

Namespace: LLCryptoLib.Security.Certificates
Assembly: LLCryptoLib (in LLCryptoLib.dll) Version: 2.0.1024.0 (2.0.1024)

Syntax

C#
public byte[] ToPfxBuffer(
	string password,
	bool exportPrivateKeys
)
Visual Basic
Public Function ToPfxBuffer ( _
	password As String, _
	exportPrivateKeys As Boolean _
) As Byte()
Visual C++
public:
array<unsigned char>^ ToPfxBuffer(
	String^ password, 
	bool exportPrivateKeys
)

Parameters

password
Type: System..::..String
The password to use when encrypting the private keys.
exportPrivateKeys
Type: System..::..Boolean
true if the private keys should be exported [if possible], false otherwise.

Return Value

An array of bytes that represents the PFX encoded store.

Exceptions

ExceptionCondition
System..::..ArgumentNullExceptionpassword is a null reference (Nothing in Visual Basic).
LLCryptoLib.Security.Certificates..::..CertificateExceptionAn error occurs while exporting the certificate store.

See Also