EldoS
Navigation
Web site
Support
Table Of Contents

Filter: C#  VB.NET  Pascal  ActiveX  DLL 


TElX509Certificate.LoadKeyFromStreamPVK

TElX509Certificate     See also    


 

Reads the certificate's corresponding private key from the stream. The key should be contained in PVK format.

 
 

Declaration

[C#]
    int LoadKeyFromStreamPVK(System.IO.Stream Stream, [in] string PassPhrase, int Count /* = 0 */);

[VB.NET]
    Function LoadKeyFromStreamPVK(ByVal Stream As System.IO.Stream, ByVal PassPhrase As String, ByVal Count As Integer = 0) As Integer

[Pascal]
    function LoadKeyFromStreamPVK(Stream : TStream; const Password : string; Count : integer = 0) : integer;

[VB6]
    not implemented

[ActiveX]
    not implemented

[DLL]
    not applicable;
 
 

Parameters

  • Stream - The stream from which the private key is loaded.
  • Count - Optional parameter that specified the number of bytes to be read. If this parameter is zero, the whole stream (from current position till the end) is read.
  • Password - The password to decrypt the private key. If the key is not encrypted, set this parameter to empty string
 
 

Return value

    0 on success.
    PVK error code otherwise.

 
 

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

    Use this method to read the certificate's private key from the stream. The read operation is started at current stream position and finished when the end of the stream reached or when the number of bytes specified in Count parameter is read. The private key must have been saved in PVK (Microsoft secret) format.

 
 

See also:     LoadKeyFromStream     LoadKeyFromStreamMS     LoadKeyFromStreamNET     LoadKeyFromStreamPEM     LoadKeyFromBufferPVK     SaveKeyToBufferPVK     SaveKeyToStreamPVK    

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