mdex_tree_hash(3)

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.

From liblibrecast-dev 0.9.1-1 in Debian 13 (Trixie). Parsed by carta from the page's man source.