struct FlowSshC_PublicKey {};

FlowSshC_PublicKey* __cdecl FlowSshC_PublicKey_CreateFromKeypair(FlowSshC_Keypair* keypair);
FlowSshC_PublicKey* __cdecl FlowSshC_PublicKey_CreateFromData(unsigned char const* data, unsigned int dataBytes);
FlowSshC_PublicKey* __cdecl FlowSshC_PublicKey_CreateCopy(FlowSshC_PublicKey* publicKey);


class PublicKey : public MainBase (.. RefCountable, public NoCopy)
  PublicKey(RefPtrConst<Keypair> const& keypair);
  PublicKey(Data const& data);
  PublicKey(FlowSshC_PublicKey* publicKey);


public class PublicKey : IDisposable, MainBase
  public PublicKey(Keypair keypair);
  public PublicKey(byte[] data);


Creation, Destruction

  • CreateFromKeypair - Create a public-key object from a keypair.
  • CreateFromData - Load a public-key object from data.
  • [C/C++] CreateCopy - Create a public-key object from another public-key.
  • [C] AddRef - Increment reference count.
  • [C] Release - Decrement reference count.

Get Information and Data **

[.NET] Disposing

  • IsDisposed - Is the object disposed?
  • Dispose - Release all resources used by the object.


This interface manages public-keys. It enables you to create or to load (from data) a public-key object, to examine its various attributes, and to export its data to several available formats. In FlowSshC, public-keys are represented by an opaque FlowSshC_PublicKey structure. In FlowSshCpp/Net they are managed by the PublicKey class. For the most part, you will end up using public-keys when connecting to SSH servers. Note that before a connection is established, a public-key representing the server is passed to you through the [Client]OnHostKey handler. There one evaluates the fingerprint(s) of the host-key to decide if the server is trustworthy.

** [C] The caller must release the returned BSTR with SysFreeString.