Discuss this help topic in SecureBlackbox Forum


TElCertificateRequest     See also     

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

This method loads the private key from the memory buffer. Buffer should contain certificate in PEM format.


    int LoadKeyFromBufferPEM(byte[] Buffer, int StartIndex, int Size, string Passphrase);

    Function LoadKeyFromBufferPEM(ByVal Buffer As Byte(), ByVal StartIndex As Integer, ByVal Size As Integer, ByVal Passphrase As String) As Integer

    procedure LoadKeyFromBufferPEM( Buffer : pointer; Size : integer; const Passphrase : string);

    int32_t LoadKeyFromBufferPEM(void * Buffer, int32_t Size, const std::string &Passphrase);

    integer LoadKeyFromBufferPEM(TSBPointer|array of byte|string|NULL $Buffer, integer $Size, string $Passphrase)

    int loadKeyFromBufferPEM(byte[] Buffer, int StartIndex, int Size, String Passphrase);


  • Buffer - pointer to buffer with private key data
  • StartIndex - index of the first byte of the key data in Buffer
  • Size - the length of the key data in bytes
  • Passphrase - the pass phrase to decrypt the certificate data. If certificate is not encrypted, set this parameter to an empty string.

Return value

    Returns 0 on success, and PEM error code otherwise.


    Use this method to load a private key to be used for request regeneration from PEM buffer.

See also:     LoadKeyFromBuffer     LoadKeyFromStream     LoadKeyFromStreamPEM     KeyMaterial    

Discuss this help topic in SecureBlackbox Forum