Discuss this help topic in SecureBlackbox Forum

TElX509Certificate.LoadKeyFromStreamMS

TElX509Certificate     See also     


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


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

Declaration

[C#]
    int LoadKeyFromStreamMS(System.IO.Stream Stream, int Count);

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

[Pascal]
    function LoadKeyFromStreamMS(Stream: TStream; Count: integer = 0) : integer;

[C++]
    int32_t LoadKeyFromStreamMS(TStream &Stream, int32_t Count);
    int32_t LoadKeyFromStreamMS(TStream *Stream, int32_t Count);

[PHP]
    integer LoadKeyFromStreamMS(TStream $Stream, integer $Count)

[Java]
    int loadKeyFromStreamMS(InputStream Stream, int Count);
    int loadKeyFromStreamMS(TElStream Stream, int Count);

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.

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

Discuss this help topic in SecureBlackbox Forum