MDEX_TREE_HASH(3) | Librecast Programmer's Manual | MDEX_TREE_HASH(3) |
mdex_tree_hash - create hash of merkle tree root
Librecast library (liblibrecast, -llibrecast)
#include <librecast/mdex.h>
int mdex_tree_hash(unsigned char *hash, size_t hashlen, mtree_t *mtree, size_t n);
Compile and link with -llibrecast.
The mdex_tree_hash function creates a hash of length hashlen from the root node of mtree with key n. This is used to index an mtree in several parts, and to distinguish the root node from the first data node when nodes = 1.
The mdex_tree_hash() returns zero on success. On error, -1 is returned.
hash_generic_key(3), mdex_init(3), mdex_free(3), mdex_get(3), mdex_put(3), mdex_del(3), lc_share(3)
2023-07-23 | LIBRECAST |