source: trunk/include/sh_tiger.h@ 135

Last change on this file since 135 was 133, checked in by rainer, 17 years ago

Reentrant checksum/hash functions.

File size: 1.1 KB
RevLine 
[1]1
2#ifndef SH_TIGER_H
3#define SH_TIGER_H
4
5#include "config_xor.h"
6#include "slib.h"
7#include "samhain.h"
8
[133]9typedef long int TigerType;
10
11#define TIGER_FILE -1;
12#define TIGER_DATA -2;
13
14/****************
[1]15typedef enum {
16 TIGER_FILE,
17 TIGER_FD,
18 TIGER_DATA
19} TigerType;
[133]20*****************/
[1]21
[107]22#define TIGER_NOLIM ((UINT64)-1)
23
[1]24/* the checksum function
25 */
[20]26/*@owned@*/ char * sh_tiger_hash (const char * filename, TigerType what,
[133]27 UINT64 Length, char * out, size_t len);
[1]28
29/* NEW Thu Oct 18 19:59:08 CEST 2001
30 */
[22]31int sh_tiger_hashtype (const char * c);
[1]32char * sh_tiger_generic_hash (char * filename, TigerType what,
[133]33 UINT64 Length, int timeout,
34 char * out, size_t len);
[1]35
36UINT32 * sh_tiger_hash_uint32 (char * filename,
37 TigerType what,
[133]38 UINT64 Length, UINT32 * out, size_t len);
[1]39
40/* get the type of hash function used
41 * 0 = tiger192, 1 = sha1, 2 = md5
42 */
43int sh_tiger_get_hashtype ();
44
[133]45/* GnuPG-like format, returns allocated memory
[1]46 */
[20]47/*@owned@*/ char * sh_tiger_hash_gpg (const char * filename, TigerType what,
[19]48 UINT64 Length);
[1]49#endif
Note: See TracBrowser for help on using the repository browser.