Discuss this help topic in SecureBlackbox Forum

TElX509Certificate.LoadFromBufferAuto

TElX509Certificate     See also     


Filter: C#/Java  VB.NET  Pascal  C++  PHP  


Loads the certificate from the memory buffer.

Declaration

[C#/Java]
    int LoadFromBufferAuto(byte[] Buffer, int StartIndex, int Count, string Password);

[VB.NET]
    Function LoadFromBufferAuto(ByVal Buffer As Byte(), ByVal StartIndex As Integer, ByVal Count As Integer, ByVal Password As String) As Integer

[Pascal]
    function LoadFromBufferAuto(Buffer : pointer; Size : integer; const Password : string) : integer;

[C++]
    int32_t LoadFromBufferAuto(void * Buffer, int32_t Size, const std::string &Password);

[PHP]
    integer LoadFromBufferAuto(TSBPointer|array of byte|string|NULL $Buffer, integer $Size, string $Password)

Parameters

  • Buffer - the buffer from which the certificate is loaded.
  • StartIndex - index of the first byte of the certificate data in the Buffer.
  • Count - number of bytes to read from buffer.
  • Size - the size of the buffer from which the data is loaded.
  • Password - the password to decrypt the certificate data.

Return value

    0 on success.
    Error code otherwise.
    If the format of the certificate is not recognized, SB_X509_ERROR_UNRECOGNIZED_FORMAT (0x5009) error is reported.

Description

    This method attempts to read the certificate from the provided memory location of the given size. It recognizes the format automatically; if the format is not recognized, SB_X509_ERROR_UNRECOGNIZED_FORMAT (0x5009) error is reported. The supported formats are DER, PEM, PFX, SPC.

See also:     LoadFromFileAuto     LoadFromStreamAuto    

Discuss this help topic in SecureBlackbox Forum