Patterned after sha.c by A.M. Kuchling and others.
|
Data Structures |
| struct | TTH_CONTEXT |
Defines |
| #define | TTH_NODESIZE (TIGERSIZE * 2) |
| #define | TTH_STACKSIZE (TIGERSIZE * 56) |
| #define | D(x) x x |
| #define | Ax1024 D(D(D(D(D(D(D(D(D(D("A")))))))))) |
| #define | Ax1025 Ax1024 "A" |
Enumerations |
| enum | { TTH_F_INITIALIZED = 1 << 0,
TTH_F_FINISHED = 1 << 1
} |
Functions |
| filesize_t | tt_block_count (filesize_t filesize) |
| unsigned | tt_full_depth (filesize_t filesize) |
| unsigned | tt_good_depth (filesize_t filesize) |
| filesize_t | tt_good_slice_size (filesize_t filesize) |
| filesize_t | tt_node_count_at_depth (filesize_t filesize, unsigned depth) |
| size_t | tt_good_node_count (filesize_t filesize) |
| filesize_t | tt_blocks_per_leaf (filesize_t filesize) |
| void | tt_internal_hash (const struct tth *a, const struct tth *b, struct tth *dst) |
| void | tt_compose (TTH_CONTEXT *ctx) |
| void | tt_collapse (TTH_CONTEXT *ctx) |
| void | tt_block (TTH_CONTEXT *ctx) |
| void | tt_finish (TTH_CONTEXT *ctx) |
| size_t | tt_compute_parents (struct tth *dst, const struct tth *src, size_t src_leaves) |
| tth | tt_root_hash (const struct tth *src, size_t n_leaves) |
| void | tt_init (TTH_CONTEXT *ctx, filesize_t filesize) |
| void | tt_update (TTH_CONTEXT *ctx, const void *data, size_t size) |
| void | tt_digest (TTH_CONTEXT *ctx, struct tth *hash) |
| size_t | tt_size (void) |
| const struct tth * | tt_leaves (TTH_CONTEXT *ctx) |
| size_t | tt_leave_count (TTH_CONTEXT *ctx) |
| void | tt_check (void) |
| | Runs some test cases to check whether the implementation is alright.
|