mdex_tree_hash3
Create hash of merkle tree root
Usage
#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.
Library
Librecast library (liblibrecast, -llibrecast)
Overview
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.
Return value
The mdex_tree_hash() returns zero on success. On error, -1 is returned.