MailBee.NET Objects 4.0

Certificate Constructor (Byte[], CertFileType, String)

Loads the certificate from binary data and returns it as Certificate object.

public Certificate(
   byte[] bytes,
   CertFileType fileType,
   string pfxFilePassword
);

Parameters

bytes
Binary content of the certificate data.
fileType
The format of the certificate data.
pfxFilePassword
The .PFX file password, or a null reference (Nothing in Visual Basic) if is not Pfx.

Remarks

Although the certificate is being read from memory, not from a disk file, still applies. For instance, when the certificate is being loaded from a disk file, MailBee simply reads the file data into memory and then calls the current constructor to create Certificate object accordingly the specified value and the data loaded from the file.

Exceptions

Exception Type Condition
MailBeeInvalidArgumentException is a null reference (Nothing in Visual Basic).
MailBeeCertificateParsingException is not a certificate data of the specified format.
MailBeeCertificateWin32Exception Win32 returned an error during during processing the certificate data.
MailBeeLicenseException MailBee.NET Security Powerup not licensed.

See Also

Certificate Class | MailBee.Security Namespace | Certificate Constructor Overload List