Discuss this help topic in SecureBlackbox Forum

TElX509Certificate.LoadKeyFromBufferPEM

TElX509Certificate     See also     


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


Loads the certificate's private key from the memory buffer. The key must be stored in PEM format.

Declaration

[C#]
    int LoadKeyFromBufferPEM(byte[] Buffer, string PassPhrase);
    int LoadKeyFromBufferPEM(byte[] Buffer, int StartIndex, int Count, string PassPhrase);

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

[Pascal]
    function LoadKeyFromBufferPEM(Buffer: Pointer; Size: integer; PassPhrase : string) : integer;

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

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

[Java]
    int loadKeyFromBufferPEM(byte[] Buffer, int StartIndex, int Count, String PassPhrase);
    int loadKeyFromBufferPEM(byte[] Buffer, String PassPhrase);

Parameters

  • Buffer - the buffer from which the key is loaded.
  • Size - the size of the buffer from which the data is loaded.
  • PassPhrase - the pass phrase to decrypt the key. If the key is not encrypted, set this parameter to empty string.
  • StartIndex -
  • Count -

Return value

    0 - if the key was successfully loaded.
    Otherwise PEM error code.

Description

    This method attempts to read the certificate's private key from the provided memory location of the given size. The key must have been saved in PEM format.

Discuss this help topic in SecureBlackbox Forum