Discuss this help topic in SecureBlackbox Forum

TElSSHKey.SavePublicKey

TElSSHKey     See also     


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


This method saves the public key to file or buffer.

Declaration

[C#/Java]
    int SavePublicKey(ref byte[] Buffer, ref int Size, TSBEOLMarker EOLMarker);
    int SavePublicKey(string PublicKeyFile, TSBEOLMarker EOLMarker);

[VB.NET]
    Function SavePublicKey(ByRef Buffer As Byte(), ByRef Size As Integer, ByVal EOLMarker As TSBEOLMarker) As Integer
    Function SavePublicKey(ByVal PublicKeyFile As String, ByVal EOLMarker As TSBEOLMarker) As Integer

[Pascal]
    function SavePublicKey(const PublicKeyFile : string; EOLMarker: TSBEOLMarker = emCRLF) : integer;
    function SavePublicKey(Buffer: pointer; var Size : integer; EOLMarker: TSBEOLMarker = emCRLF) : integer;

[C++]
    int32_t SavePublicKey(void * Buffer, int32_t &Size, TSBEOLMarker EOLMarker);
    int32_t SavePublicKey(const std::string &PublicKeyFile, TSBEOLMarker EOLMarker);

[PHP]
    integer SavePublicKey(TSBPointer|array of byte|string|NULL $Buffer, integer &$Size, integer $EOLMarker)
    integer SavePublicKey(string $PublicKeyFile, integer $EOLMarker)

Parameters

  • PublicKeyFile - file to which public key is saved
  • Buffer - the buffer to which the key is saved.
  • Size - the size of the buffer to which the data is saved.When the method returns, Size parameter contains the size of the data that were saved, or, if the buffer was too small,the size of the buffer enough to hold the data.
  • EOLMarker - specifies the end-of-line marker. Specification requires use of system-defined marker. Note, that some unix systems have problems handling CRLF EOL marker.

TSBEOLMarker values


Return value

     Returns 0 on success, and error code otherwise.

Description

    Use this method to save public key to file or buffer in KeyFormat format.

See also:     LoadPrivateKey     LoadPublicKey     SavePrivateKey    

Discuss this help topic in SecureBlackbox Forum