Discuss this help topic in SecureBlackbox Forum

TElCertificateRequest.LoadKeyFromStreamPEM

TElCertificateRequest     See also     


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


Reads the private key from the stream in PEM format.

Declaration

[C#]
    int LoadKeyFromStreamPEM(System.IO.Stream Stream, string Passphrase, int Count);

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

[Pascal]
    procedure LoadKeyFromStreamPEM(Stream: TStream; const Passphrase : string; Count : integer = 0);

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

[PHP]
    integer LoadKeyFromStreamPEM(TStream $Stream, string $Passphrase, integer $Count)

[Java]
    int loadKeyFromStreamPEM(TElStream Stream, String Passphrase, int Count);
    int loadKeyFromStreamPEM(InputStream Stream, String Passphrase, int Count);

Parameters

  • Stream - The stream from which the certificate request is loaded.
  • Count - Optional parameter that specified the number of bytes to be read. If this parameter is zero, the stream from current position till the end is read.
  • Passphrase - the pass phrase to decrypt the certificate data. If certificate is not encrypted, set this parameter to an empty string.

Return value

    Returns 0 on success, and PEM error code otherwise.

Description

    Use this method to load a private key to be used for request regeneration from stream in PEM format.

See also:     LoadKeyFromBuffer     LoadKeyFromBufferPEM     LoadKeyFromStream     KeyMaterial    

Discuss this help topic in SecureBlackbox Forum