Mentalis.org Security Library documentation

Certificate.CreateFromCerFile Method (Byte[], Int32, Int32)

Creates a new instance of the Certificate class by reading a certificate from a certificate blob.

[Visual Basic]
Overloads Public Shared Function CreateFromCerFile( _
   ByVal file As Byte(), _
   ByVal offset As Integer, _
   ByVal size As Integer _
) As Certificate
[C#]
public static Certificate CreateFromCerFile(
   byte[] file,
   int offset,
   int size
);

Parameters

file
The contents of the certificate file.
offset
The offset from which to start reading.
size
The length of the certificate.

Return Value

A Certificate instance.

Exceptions

Exception TypeCondition
ArgumentNullExceptionfile if a null reference (Nothing in Visual Basic).
CertificateExceptionAn error occurs while loading the specified certificate.

See Also

Certificate Class | Certificate Members | Org.Mentalis.Security.Certificates Namespace | Certificate.CreateFromCerFile Overload List