EldoS
Navigation
Web site
Support
Table Of Contents

Filter: C#  VB.NET  Pascal  ActiveX  DLL 


TElX509Certificate.LoadKeyFromBufferPVK

TElX509Certificate     See also    


 

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

 
 

Declaration

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

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

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

[VB6]
    Sub IElCertificateX3.LoadFromBufferPVK(Buffer As Byte(), Password As String)

[ActiveX]
    HRESULT _stdcall IElCertificateX3.LoadFromBufferPVK([in] VARIANT Buffer, [in] BSTR Password );

[DLL]
    not implemented;
 
 

Parameters

  • Buffer - the buffer from which the key is loaded.
  • Size - the size of the buffer from which the data is loaded.
  • Password - The password to decrypt the private key. If the key is not encrypted, set this parameter to empty string
 
 

Return value

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

 
 

PVK Error Codes

[.NET] [Pascal] Value Description
SB_X509_ERROR_INVALID_PVK_FILE 20481 (0x5001) Buffer doesn't contain a valid PVK sequence
SB_X509_ERROR_INVALID_PASSWORD 20482 (0x5002) A non-valid password was specified
SB_X509_ERROR_NO_PRIVATE_KEY 20483 (0x5003) Attempt to save private key when it is absent.
SB_X509_ERROR_UNSUPPORTED_ALGORITHM 20484 (0x5004) Attempt to save a key for the algorithm that is not supported by PVK.
SB_X509_ERROR_INVALID_PRIVATE_KEY 20485 (0x5005) The private key has invalid format.
SB_X509_ERROR_INTERNAL_ERROR 20486 (0x5006) Internal error occured. Please contact EldoS support for details.
SB_X509_ERROR_BUFFER_TOO_SMALL 20487 (0x5007) Buffer doesn't have enough space to store encoded certificate
SB_X509_ERROR_NO_CERTIFICATE 20488 (0x5008) Buffer doesn't contain a certificate
Declared in
[.NET] [Pascal]
Namespace: SBX509
Assembly: SecureBlackbox
Unit: SBX509

 
 

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 PVK (Microsoft secret) format.

 
 

See also:     LoadKeyFromBuffer     LoadKeyFromBufferMS     LoadKeyFromBufferNET     LoadKeyFromBufferPEM     LoadKeyFromStreamPVK     SaveKeyToBufferPVK     SaveKeyToStreamPVK    

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