~ubuntu-branches/debian/jessie/ccache/jessie

« back to all changes in this revision

Viewing changes to hashutil.h

  • Committer: Bazaar Package Importer
  • Author(s): Loïc Minier
  • Date: 2010-10-13 17:14:13 UTC
  • mfrom: (5.1.1 sid)
  • Revision ID: james.westby@ubuntu.com-20101013171413-4ehrj1y89huf069u
Tags: 3.0.1-1ubuntu1
* Merge with Debian; remaining changes:
  - Add gcc/g++-4.4 and -4.5 symlinks.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef HASHUTIL_H
 
2
#define HASHUTIL_H
 
3
 
 
4
#include "mdfour.h"
 
5
#include <inttypes.h>
 
6
 
 
7
struct file_hash
 
8
{
 
9
        uint8_t hash[16];
 
10
        uint32_t size;
 
11
};
 
12
 
 
13
unsigned int hash_from_string(void *str);
 
14
int strings_equal(void *str1, void *str2);
 
15
int file_hashes_equal(struct file_hash *fh1, struct file_hash *fh2);
 
16
 
 
17
#define HASH_SOURCE_CODE_OK 0
 
18
#define HASH_SOURCE_CODE_ERROR 1
 
19
#define HASH_SOURCE_CODE_FOUND_DATE 2
 
20
#define HASH_SOURCE_CODE_FOUND_TIME 4
 
21
 
 
22
int hash_source_code_string(
 
23
        struct mdfour *hash, const char *str, size_t len, const char *path);
 
24
int hash_source_code_file(struct mdfour *hash, const char *path);
 
25
 
 
26
#endif