Back to FlowSsh Documentation

PublicKey - CreateFromData


FlowSshC_PublicKey* __cdecl FlowSshC_PublicKey_CreateFromData(
  unsigned char const* data,
  unsigned int dataBytes);


[PublicKey] PublicKey(Data const& data);


[PublicKey] public PublicKey(byte[] data);


  • data: The public-key data. Supported formats are OpenSSH, SSH2, and Bitvise.
       In [C] an array of type unsigned char (=byte).
       In [Cpp] a Data object.
       In [Net] an array of type Byte.
  • [C] dataBytes: Number of bytes in the array.

[C] Return Value

On success, returns a pointer to the created FlowSshC_PublicKey. If the data is corrupt, NULL is returned.


Creates a public-key from the given data. Supported data formats are OpenSSH, SSH2, and Bitvise.
[Cpp/Net] A PublicKeyLoadException is thrown if the data is corrupt.