Need help with telehash-c?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

telehash
124 Stars 33 Forks MIT License 1.8K Commits 16 Opened issues

Description

telehash tools library in c

Services available

!
?

Need anything else?

Contributors list

telehash tools library in c

This is a full implementation of telehash in portable c for embedded systems, designed to be source that can be copied into other projects.

Building

Just run

make
to build a
libtelehash.a
and some utility apps into
bin/*
. Use
make test
to run a full test suite, and
make static
to generate a current standalone
telehash.c
and
telehash.h
.

Use

npm install
to automatically install optional crypto dependencies (libsodium and libtomcrypt).

Library Interface

The codebase is a set of components that can be used to create/integrate telehash services, here's a rough layout, see src/ and include/ for details.

  • e3x_*
    : all of the crypto handling
  • mesh_*
    and
    link_*
    : higher level easy interfaces for apps
  • ext_*
    : various useful extensions to a mesh to support built-in channels
  • pipe_*
    and
    net_*
    : transport and networking handling
  • util_*
    and libs: portable utilities and bundled libs

There's many examples of usage in the bundled tests.

Memory Notes

Most of the codebase uses lob_t as the primary data type since it handles JSON and binary for all packets.

The following methods return generated lobs (you must free):

  • e3xchannelreceiving
  • e3xchannelsending
  • e3xchanneloob
  • e3xchannelpacket
  • e3xselfdecrypt
  • e3xexchangemessage
  • e3xexchangehandshake
  • e3xexchangereceive
  • link_handshakes
  • link_sync
  • link_resync
  • meshonopen (callback must return or free the given lob)

And these methods consume lobs (will be free'd):

  • e3xchannelreceive
  • e3xchannelsend
  • link_handshake
  • link_receive
  • linkreceivehandshake
  • link_send
  • link_flush
  • link_direct
  • mesh_handshake
  • mesh_handshakes
  • mesh_receive
  • meshreceivehandshake

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.