[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] | 9 | typedef long int TigerType;
|
---|
| 10 |
|
---|
[138] | 11 | #define TIGER_FILE -1
|
---|
| 12 | #define TIGER_DATA -2
|
---|
[133] | 13 |
|
---|
| 14 | /****************
|
---|
[138] | 15 | typedef long int TigerType;
|
---|
[1] | 16 | typedef enum {
|
---|
| 17 | TIGER_FILE,
|
---|
| 18 | TIGER_FD,
|
---|
| 19 | TIGER_DATA
|
---|
| 20 | } TigerType;
|
---|
[133] | 21 | *****************/
|
---|
[1] | 22 |
|
---|
[107] | 23 | #define TIGER_NOLIM ((UINT64)-1)
|
---|
| 24 |
|
---|
[1] | 25 | /* the checksum function
|
---|
| 26 | */
|
---|
[138] | 27 | char * sh_tiger_hash (const char * filename, TigerType what,
|
---|
| 28 | UINT64 Length, char * out, size_t len);
|
---|
[1] | 29 |
|
---|
| 30 | /* NEW Thu Oct 18 19:59:08 CEST 2001
|
---|
| 31 | */
|
---|
[22] | 32 | int sh_tiger_hashtype (const char * c);
|
---|
[1] | 33 | char * sh_tiger_generic_hash (char * filename, TigerType what,
|
---|
[151] | 34 | UINT64 * Length, int timeout,
|
---|
[133] | 35 | char * out, size_t len);
|
---|
[1] | 36 |
|
---|
| 37 | UINT32 * sh_tiger_hash_uint32 (char * filename,
|
---|
| 38 | TigerType what,
|
---|
[133] | 39 | UINT64 Length, UINT32 * out, size_t len);
|
---|
[1] | 40 |
|
---|
| 41 | /* get the type of hash function used
|
---|
| 42 | * 0 = tiger192, 1 = sha1, 2 = md5
|
---|
| 43 | */
|
---|
[170] | 44 | int sh_tiger_get_hashtype (void);
|
---|
[1] | 45 |
|
---|
[481] | 46 | /* set the hash fuction in use in the mask
|
---|
| 47 | */
|
---|
| 48 | void sh_tiger_get_mask_hashtype(unsigned long * mask);
|
---|
| 49 |
|
---|
| 50 |
|
---|
| 51 | /* reset the hash function to the one in the mask
|
---|
| 52 | */
|
---|
| 53 | void sh_tiger_set_hashtype_mask(unsigned long mask);
|
---|
| 54 |
|
---|
[133] | 55 | /* GnuPG-like format, returns allocated memory
|
---|
[1] | 56 | */
|
---|
[20] | 57 | /*@owned@*/ char * sh_tiger_hash_gpg (const char * filename, TigerType what,
|
---|
[19] | 58 | UINT64 Length);
|
---|
[1] | 59 | #endif
|
---|