Discuss this help topic in SecureBlackbox Forum


TElSSHKey     See also     

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

This method loads the public key from file or buffer.


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

    Function LoadPublicKey(ByVal PublicKeyFile As String) As Integer
    Function LoadPublicKey(ByVal Buffer As Byte(), ByVal Size As Integer) As Integer

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

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

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

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


  • 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.


    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