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

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

Syntax

C#
public static Certificate CreateFromCerFile(
	byte[] file,
	int offset,
	int size
)
Visual Basic
Public Shared Function CreateFromCerFile ( _
	file As Byte(), _
	offset As Integer, _
	size As Integer _
) As Certificate
Visual C++
public:
static Certificate^ CreateFromCerFile(
	array<unsigned char>^ file, 
	int offset, 
	int size
)

Parameters

file
Type: array<System..::..Byte>[]()[][]
The contents of the certificate file.
offset
Type: System..::..Int32
The offset from which to start reading.
size
Type: System..::..Int32
The length of the certificate.

Return Value

A Certificate instance.

Exceptions

ExceptionCondition
System..::..ArgumentNullExceptionfile if a null reference (Nothing in Visual Basic).
LLCryptoLib.Security.Certificates..::..CertificateExceptionAn error occurs while loading the specified certificate.

See Also