EldoS
Navigation
Web site
Support
Table Of Contents

Filter: C#  VB.NET  Pascal  ActiveX  DLL 


TElX509Certificate.LoadKeyFromStreamMS

TElX509Certificate     See also    


 

Loads the certificate's corresponding private key from the stream in form compatible with CryptoAPI PRIVATEKEYBLOB format.

 
 

Declaration

[C#]
    public int LoadKeyFromStreamMS(System.IO.Stream Stream, int Count /* = 0 */);

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

[Pascal]
    function LoadKeyFromStreamMS(Stream: TStream; 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.
 
 

Return value

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

 
 

MS Error Codes

[Pascal] Value Description
SB_MSKEYBLOB_ERROR_UNSUPPORTED_BLOB_TYPE 8449 (0x2101) Format has type that is not supported. Supported types are PRIVATEKEYBLOB and PUBLICKEYBLOB
SB_MSKEYBLOB_ERROR_INVALID_FORMAT 8450 (0x2102) Buffer doesn't contain valid MS key blob sequence.
SB_MSKEYBLOB_ERROR_UNSUPPORTED_VERSION 8451 (0x2103) Key version is not supported.
SB_MSKEYBLOB_ERROR_BUFFER_TOO_SMALL 8452 (0x2104) The buffer is too small.
SB_MSKEYBLOB_ERROR_NO_PRIVATE_KEY 8453 (0x2105) There is no private key but attempt to save it was made.
SB_MSKEYBLOB_ERROR_UNSUPPORTED_ALGORITHM 8454 (0x2106) Key contains unsupported algorithm or certificate algorithm is DH (Diffie-Hellman).
Declared in
[.NET] [Pascal]
Namespace: SBMSKeyBlob
Assembly: SecureBlackbox
Unit: SBMSKeyBlob

 
 

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 is reached or when the number of bytes specified in Count parameter is read. The private key must have been saved in PRIVATEKEYBLOB format compatible with CryptoAPI

 
 

See also:     LoadKeyFromStream     LoadKeyFromStreamMS     LoadKeyFromStreamNET     LoadKeyFromStreamPEM     LoadKeyFromStreamPVK    

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