1 #ifndef INCLUDED_THEX_H
2 #define INCLUDED_THEX_H
3 /* vim: set ts=8 sts=4 sw=4 tw=80 noet: */
4 /*======================================================================
5 Copyright (C) 2004,2005,2009 Walter Doekes <walter+tthsum@wjd.nu>
6 This file is part of tthsum.
7 
8 tthsum is free software: you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation, either version 3 of the License, or
11 (at your option) any later version.
12 
13 tthsum is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 GNU General Public License for more details.
17 
18 You should have received a copy of the GNU General Public License
19 along with tthsum.  If not, see <http://www.gnu.org/licenses/>.
20 ======================================================================*/
21 
22 /**
23  * Calculates the root of the merkle hash tree.
24  */
25 
26 #include "read.h"
27 #include "types.h"
28 
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
32 
33 /**
34  * Calculate the THEX/Tiger (TTH) root of the specified file.
35  * The root hash will be placed in res which must be at least 3 uint64_t's
36  * long.
37  */
38 int thex_tiger_root(struct rofile* stream, uint64_t* result,
39 	void (*progress_func)(uint64_t,uint64_t));
40 
41 
42 #ifdef __cplusplus
43 } /* extern "C" */
44 #endif /* __cplusplus */
45 
46 #endif /* INCLUDED_THEX_H */
47