Discuss this help topic in SecureBlackbox Forum

TElX509Certificate.SaveKeyToStreamPVK

TElX509Certificate     See also     


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


Saves the private key of the certificate to the stream in PVK format.

Declaration

[C#]
    int SaveKeyToStreamPVK(System.IO.Stream Stream, string Password, bool UseStrongEncryption);

[VB.NET]
    Function SaveKeyToStreamPVK(ByVal Stream As System.IO.Stream, ByVal Password As String, ByVal UseStrongEncryption As Boolean) As Integer

[Pascal]
    function SaveKeyToStreamPVK(Stream : TStream; const Password : string; UseStrongEncryption: boolean = true) : integer;

[C++]
    int32_t SaveKeyToStreamPVK(TStream &Stream, const std::string &Password, bool UseStrongEncryption);
    int32_t SaveKeyToStreamPVK(TStream *Stream, const std::string &Password, bool UseStrongEncryption);

[PHP]
    integer SaveKeyToStreamPVK(TStream $Stream, string $Password, bool $UseStrongEncryption)

[Java]
    int saveKeyToStreamPVK(TElStream Stream, String Password, boolean UseStrongEncryption);
    int saveKeyToStreamPVK(OutputStream Stream, String Password, boolean UseStrongEncryption);

Parameters

  • Stream - the TStream (in Pascal case) object to which the private key is saved
  • Password - the password to encrypt the key. If the key shouldn't be encrypted, set this parameter to empty string
  • UseStrongEncryption - determines the key length. IfTrue the 128-bits key is used.
    False - 40-bits key.
    Default value is True

Return value

    0 - if the key was successfully saved.
    Otherwise PVK error code.

Description

    This method saves the private key to the provided stream. The private key will be saved in PVK (Microsoft secret) format.

Discuss this help topic in SecureBlackbox Forum