Discuss this help topic in SecureBlackbox Forum

TElSSHKey.LoadPublicKey

TElSSHKey     See also     


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


This method loads the public key from file or buffer.

Declaration

[C#]
    int LoadPublicKey(string PublicKeyFile);
    int LoadPublicKey(byte[] Buffer, int Size);

[VB.NET]
    Function LoadPublicKey(ByVal PublicKeyFile As String) As Integer
    Function LoadPublicKey(ByVal Buffer As Byte(), ByVal Size As Integer) As Integer

[Pascal]
    function LoadPublicKey(const PublicKeyFile : string) : integer;
    function LoadPublicKey(Buffer: pointer; Size : integer) : integer;

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

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

[Java]
    int loadPublicKey(String PublicKeyFile);
    int loadPublicKey(byte[] Buffer, int Size);

Parameters

  • PublicKeyFile - file which contains public key
  • Buffer - buffer which contains public key
  • Size - size of the buffer from which the data is loaded

Return value

    0 - on success.
    Error code otherwise.

Description

    Use this method to load RSA/DSA public key from file or buffer. OpenSSH/IETF format is auto recognized. If you load from file such file usually has the 'pub' extension.

See also:     LoadPrivateKey     SavePrivateKey     SavePublicKey    

Discuss this help topic in SecureBlackbox Forum