Keypair

[C]

struct FlowSshC_Keypair {};

Creation
---------
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);

[C++]

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

[C#]

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

Members

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.

General

Get Data **

[.NET] Disposing

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

Remarks

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.