.TH MDEX_TREE_HASH 3 2023-07-23 "LIBRECAST" "Librecast Programmer's Manual" .SH NAME mdex_tree_hash \- create hash of merkle tree root .SH LIBRARY Librecast library .RI ( liblibrecast ", " \-llibrecast ) .SH SYNOPSIS .nf .B #include .PP .BI "int mdex_tree_hash(unsigned char " *hash ", size_t " hashlen ", mtree_t " *mtree ", size_t " n ");" .fi .PP Compile and link with \fI\-llibrecast\fP. .SH DESCRIPTION The .BR mdex_tree_hash function creates a .IR hash of length .IR hashlen from the root node of .IR mtree with key .IR 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. .PP .SH RETURN VALUE The .BR mdex_tree_hash () returns zero on success. On error, \-1 is returned. .PP .SH SEE ALSO .BR hash_generic_key (3), .BR mdex_init (3), .BR mdex_free (3), .BR mdex_get (3), .BR mdex_put (3), .BR mdex_del (3), .BR lc_share (3)