Mentalis.org Security Library documentation

CertificateStore.CreateFromPfxFile Method (Byte[], String)

Creates a new certificate store from a PFX/P12 encoded file.

[Visual Basic]
Overloads Public Shared Function CreateFromPfxFile( _
   ByVal file As Byte(), _
   ByVal password As String _
) As CertificateStore
[C#]
public static CertificateStore CreateFromPfxFile(
   byte[] file,
   string password
);

Parameters

file
The contents of a PFX file.
password
The password used to encrypt the private key.

Return Value

A CertificateStore instance.

Remarks

Thanks go out to Chris Hudel for the implementation of this method.

Exceptions

Exception TypeCondition
ArgumentNullExceptionfile or password is a null reference (Nothing in Visual Basic).
CertificateExceptionAn error occurs while loading the PFX file.

See Also

CertificateStore Class | Org.Mentalis.Security.Certificates Namespace | CertificateStore.CreateFromPfxFile Overload List