telehash / telehash-c

telehash tools library in c
MIT License
122 stars 31 forks source link

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.

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):

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