Ignore:
Timestamp:
Oct 25, 2007, 12:19:05 AM (12 years ago)
Author:
rainer
Message:

Reentrant checksum/hash functions.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/sh_tiger.h

    r107 r133  
    77#include "samhain.h"
    88
     9typedef long int TigerType;
     10
     11#define TIGER_FILE -1;
     12#define TIGER_DATA -2;
     13
     14/****************
    915typedef enum {
    1016  TIGER_FILE,
     
    1218  TIGER_DATA
    1319} TigerType;
     20*****************/
    1421
    1522#define TIGER_NOLIM ((UINT64)-1)
    16 
    17 extern SL_TICKET tiger_fd;
    1823
    1924/* the checksum function
    2025 */
    2126/*@owned@*/ char * sh_tiger_hash (const char * filename, TigerType what,
    22                                   UINT64 Length);
     27                                  UINT64 Length, char * out, size_t len);
    2328
    2429/* NEW Thu Oct 18 19:59:08 CEST 2001
     
    2631int sh_tiger_hashtype (const char * c);
    2732char * sh_tiger_generic_hash (char * filename, TigerType what,
    28                               UINT64 Length, int timeout);
     33                              UINT64 Length, int timeout,
     34                              char * out, size_t len);
    2935
    3036UINT32 * sh_tiger_hash_uint32 (char * filename,
    3137                               TigerType what,
    32                                UINT64 Length);
     38                               UINT64 Length, UINT32 * out, size_t len);
    3339
    3440/* get the type of hash function used
     
    3743int sh_tiger_get_hashtype ();
    3844
    39 /* GnuPG-like format
     45/* GnuPG-like format, returns allocated memory
    4046 */
    4147/*@owned@*/ char * sh_tiger_hash_gpg (const char * filename, TigerType what,
Note: See TracChangeset for help on using the changeset viewer.