EldoS
Navigation
Web site
Support
Table Of Contents

Filter: C#  VB.NET  Pascal  ActiveX  DLL 


TElX509Certificate.LoadKeyFromBufferPEM

TElX509Certificate     See also    


 

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

 
 

Declaration

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

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

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

[VB6]
    Sub IElCertificateX2.LoadKeyFromBufferPEM(Buffer As Byte(), PassPhrase As String)

[ActiveX]
    HRESULT _stdcall IElCertificateX2.LoadKeyFromBufferPEM([in] VARIANT Buffer, [in] BSTR PassPhrase);

[DLL]
    __stdcall BOOL SBX509LoadKeyFromBufferPEM(HANDLE hCert, void* Buffer, int nSize, PCHAR PassPhrase);
 
 

Parameters

  • [DLL]handle - handle to the TElX509Certificate object that was returned by Constructor
  • Buffer - the buffer from which the key is loaded. [ActiveX] Buffer should contain a one-dimensional zero-based safe array with elements of type unsigned char (byte).
  • Size (nSize) - 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.
 
 

Return value

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

 
 

PEM Error Codes

[.NET] [Pascal] Value Description
PEM_DECODE_RESULT_INVALID_FORMAT 7425 (0x1D01) Buffer doesn't contain a valid PEM sequence
PEM_DECODE_RESULT_INVALID_PASSPHRASE 7426 (0x1D02) A non-valid passphrase was specified
PEM_DECODE_RESULT_NOT_ENOUGH_SPACE 7427 (0x1D03) There is no enough space to write encoded/decoded data
PEM_DECODE_RESULT_UNKNOWN_CIPHER 7428 (0x1D04) The message was encrypted using unknown cipher
Declared in
[.NET] [Pascal]
Namespace: SBPEM
Assembly: SecureBlackbox
Unit: SBPEM

 
 

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.

 
 

See also:     LoadKeyFromBufferAuto     ReportErrorOnPartialLoad     LoadKeyFromBuffer     LoadKeyFromBufferMS     LoadKeyFromBufferNET     LoadKeyFromStreamPEM     SaveKeyToBufferPEM     SaveKeyToStreamPEM     LoadKeyFromBufferPVK    

 
Contact Us | Terms of Use | Trademarks | Privacy Statement
Copyright (c) 1998-2012, EldoS Corporation