summaryrefslogtreecommitdiffstats
path: root/include/sh_tiger.h
blob: d1894c4090c66adcc115cbbe24467b96999bb6fb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#ifndef SH_TIGER_H
#define SH_TIGER_H 

#include "config_xor.h"
#include "slib.h"
#include "samhain.h"

typedef long int TigerType;

#define TIGER_FILE -1
#define TIGER_DATA -2

/****************
typedef long int TigerType;
typedef enum {
  TIGER_FILE,
  TIGER_FD,
  TIGER_DATA
} TigerType;
*****************/

#define TIGER_NOLIM ((UINT64)-1)

/* the checksum function
 */
char * sh_tiger_hash (const char * filename, TigerType what, 
		      UINT64 Length, char * out, size_t len);

/* NEW Thu Oct 18 19:59:08 CEST 2001
 */
int sh_tiger_hashtype (const char * c);
char * sh_tiger_generic_hash (char * filename, TigerType what, 
			      UINT64 * Length, int timeout, 
			      char * out, size_t len);

UINT32 * sh_tiger_hash_uint32 (char * filename, 
			       TigerType what, 
			       UINT64 Length, UINT32 * out, size_t len);

/* get the type of hash function used
 * 0 = tiger192, 1 = sha1, 2 = md5
 */
int sh_tiger_get_hashtype (void);

/* set the hash fuction in use in the mask
 */
void sh_tiger_get_mask_hashtype(unsigned long * mask);


/* reset the hash function to the one in the mask
 */
void sh_tiger_set_hashtype_mask(unsigned long mask);

/* GnuPG-like format, returns allocated memory
 */
/*@owned@*/ char * sh_tiger_hash_gpg (const char * filename, TigerType what, 
				      UINT64 Length);
#endif