#ifndef HASH_H #define HASH_H #include #include "tlv.h" #include "parser.h" #include "node.h" // Hash a single data void hash_data(struct pub_data *data, unsigned char *buf); // Hash every data contained in data_list then return a network hash void hash_network(struct list *data_list, unsigned char *buf); // Truncate 32 octet hash to 16 octets void hash_trunc(unsigned char *hash256bit, unsigned char *buf); // Concat all fields of data and put them in buf void concat_data(struct pub_data *data, unsigned char *buf); // Concat hash2 to hash1 (hash1 is modified) void concat_hash(unsigned char *hash1, unsigned char *hash2, size_t size); #endif