struct FlowSshC_Keypair {};

FlowSshC_Keypair* __cdecl FlowSshC_Keypair_CreateNew(wchar_t const* alg, unsigned int bitCount);
FlowSshC_Keypair* __cdecl FlowSshC_Keypair_CreateFromData(unsigned char const* data, unsigned int dataBytes, wchar_t const* passphrase);
FlowSshC_Keypair* __cdecl FlowSshC_Keypair_CreateCopy(FlowSshC_Keypair* keypair);


class Keypair : public MainBase (.. RefCountable, public NoCopy)
  Keypair(wchar_t const* alg, unsigned int bitCount);
  Keypair(Data const& data, wchar_t const* passphrase);
  Keypair(FlowSshC_Keypair* keypair);


public class Keypair : IDisposable, MainBase
  public Keypair(string alg, uint bitCount);
  public Keypair(byte[] data, string passphrase);


Creation, Destruction

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


Get Data **

[.NET] Disposing

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


This interface manages keypairs and private-keys. It enables you to create or to load (from data) a keypair object, set a passphrase on it, and to export its data to several available formats. In FlowSshC, keypairs are represented by an opaque FlowSshC_Keypair structure. In FlowSshCpp/Net they are managed by the Keypair class.

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