Discuss this help topic in SecureBlackbox Forum

TElX509Certificate.LoadKeyFromStreamPKCS8

TElX509Certificate     See also     


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


Loads the certificate's private key from stream. The key must be stored in PKCS8 format.

Declaration

[C#]
    int LoadKeyFromStreamPKCS8(System.IO.Stream Stream, string Password, int Count);

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

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

[C++]
    int32_t LoadKeyFromStreamPKCS8(TStream &Stream, const std::string &Password, int32_t Count);
    int32_t LoadKeyFromStreamPKCS8(TStream *Stream, const std::string &Password, int32_t Count);

[PHP]
    integer LoadKeyFromStreamPKCS8(TStream $Stream, string $Password, integer $Count)

[Java]
    int loadKeyFromStreamPKCS8(InputStream Stream, String Password, int Count);
    int loadKeyFromStreamPKCS8(TElStream Stream, String Password, int Count);

Parameters

  • Stream - the stream containing private key data.
  • Password - the pass phrase to decrypt the key. If the key is not encrypted, set this parameter to empty string.
  • Count - number of bytes to be read from Stream.

Return value

    Returns 0 if the key was successfully loaded, and an error code otherwise.

Description

    This method attempts to read the certificate's private key from stream. The key must have been saved in PKCS8 format.

See also:     LoadKeyFromStream     LoadKeyFromBufferPKCS8    

Discuss this help topic in SecureBlackbox Forum