Main Page | Modules | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

tigertree.h File Reference


Detailed Description

Implementation of the TigerTree algorithm.

This file comes from http://sourceforge.net/projects/tigertree/

Inclusion in gtk-gnutella is:

Author:
Jeroen Asselman
Date:
2003
Copyright (C) 2001 Bitzi (aka Bitcollider) Inc. and Gordon Mohr Released into the public domain by same; permission is explicitly granted to copy, modify, and use freely.

THE WORK IS PROVIDED "AS IS," AND COMES WITH ABSOLUTELY NO WARRANTY, EXPRESS OR IMPLIED, TO THE EXTENT PERMITTED BY APPLICABLE LAW, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.

(PD) 2001 The Bitzi Corporation Please see file COPYING or http://bitzi.com/publicdomain for more info.

#include "tiger.h"

Go to the source code of this file.

Data Structures

struct  tt_context
 The default size of interim values stack, in TIGERSIZE blocks. More...


Defines

#define TIGERSIZE   24
 tiger hash result size, in bytes

#define BLOCKSIZE   1024
 size of each block independently hashed, not counting leaf 0x00 prefix

#define NODESIZE   (TIGERSIZE * 2)
 size of input to each non-leaf tree node, not counting node 0x01 prefix


Typedefs

typedef tt_context TT_CONTEXT
 The default size of interim values stack, in TIGERSIZE blocks.


Functions

void tt_init (TT_CONTEXT *ctx)
 Initialize the tigertree context.

void tt_update (TT_CONTEXT *ctx, gchar *buffer, gint32 len)
void tt_digest (TT_CONTEXT *ctx, gchar *hash)
void tt_copy (TT_CONTEXT *dest, TT_CONTEXT *src)
 This code untested; use at own risk.


Define Documentation

#define BLOCKSIZE   1024
 

size of each block independently hashed, not counting leaf 0x00 prefix

#define NODESIZE   (TIGERSIZE * 2)
 

size of input to each non-leaf tree node, not counting node 0x01 prefix

#define TIGERSIZE   24
 

tiger hash result size, in bytes


Typedef Documentation

typedef struct tt_context TT_CONTEXT
 

The default size of interim values stack, in TIGERSIZE blocks.

If this overflows (as it will for input longer than 2^64 in size), havoc may ensue.


Function Documentation

void tt_copy TT_CONTEXT dest,
TT_CONTEXT src
 

This code untested; use at own risk.

void tt_digest TT_CONTEXT ctx,
gchar *  hash
 

void tt_init TT_CONTEXT ctx  ) 
 

Initialize the tigertree context.

void tt_update TT_CONTEXT ctx,
gchar *  buffer,
gint32  len
 


Generated on Sun Feb 12 10:50:08 2006 for Gtk-Gnutella by doxygen 1.3.6