EldoS
Navigation
Web site
Support
Table Of Contents

Filter: C#  VB.NET  Pascal  ActiveX  DLL 


TElSSHKey.LoadPublicKey

TElSSHKey     See also    


 

This method loads the public key from file or buffer.

 
 

Declaration

[C#]
    int LoadPublicKey([in] 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;

[VB6]
    Sub LoadPublicKey(PublicKeyFile As String)
    Sub LoadPublicKeyFromBuffer(Buffer)

[ActiveX]
    HRESULT _stdcall LoadPublicKey([in] BSTR PrivateKeyFile, [out, retval] long * Ret );
    HRESULT _stdcall LoadPublicKeyFromBuffer([in] VARIANT Buffer, [out, retval] long * Ret );

[DLL]
    not implemented;
 
 

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.

 

Key Error Codes

Definition Value Description
SB_ERROR_SSH_KEYS_INVALID_PUBLIC_KEY 3329 (0x0D01) public key is invalid
SB_ERROR_SSH_KEYS_INVALID_PRIVATE_KEY 3330 (0x0D02) private key is invalid
SB_ERROR_SSH_KEYS_FILE_READ_ERROR 3331 (0x0D03) error of reading from file
SB_ERROR_SSH_KEYS_FILE_WRITE_ERROR 3332 (0x0D04) error of writing to file
SB_ERROR_SSH_KEYS_UNSUPPORTED_ALGORITHM 3333 (0x0D05) algorithm is unsupported
SB_ERROR_SSH_KEYS_INTERNAL_ERROR 3334 (0x0D06) internal error
SB_ERROR_SSH_KEYS_BUFFER_TOO_SMALL 3335 (0x0D07) buffer is too small
SB_ERROR_SSH_KEYS_NO_PRIVATE_KEY 3336 (0x0D08) there is no private key
SB_ERROR_SSH_KEYS_INVALID_PASSPHRASE 3337 (0x0D09) wrong password for private key
SB_ERROR_SSH_KEYS_UNSUPPORTED_PEM_ALGORITHM 3338 (0x0D0A) PEM algorithm is unsupported
Declared in
[.NET] [Pascal]
Namespace: SBSSHKeyStorage
Assembly: SecureBlackbox.SSHCommon
Unit: SBSSHKeyStorage

 
 

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    

 
Contact Us | Terms of Use | Trademarks | Privacy Statement
Copyright (c) 1998-2012, EldoS Corporation