Discuss this help topic in SecureBlackbox Forum

TElCertificateRequest.LoadKeyFromBufferPEM

TElCertificateRequest     See also     


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


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

Declaration

[C#/Java]
    int LoadKeyFromBufferPEM(byte[] Buffer, int StartIndex, int Size, string Passphrase);

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

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

[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)

Parameters

  • 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.

Description

    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