]> git.proxmox.com Git - libgit2.git/blob - src/hash.h
Cleanup legal data
[libgit2.git] / src / hash.h
1 /*
2 * Copyright (C) 2009-2011 the libgit2 contributors
3 *
4 * This file is part of libgit2, distributed under the GNU GPL v2 with
5 * a Linking Exception. For full terms see the included COPYING file.
6 */
7 #ifndef INCLUDE_hash_h__
8 #define INCLUDE_hash_h__
9
10 #include "git2/oid.h"
11
12 typedef struct git_hash_ctx git_hash_ctx;
13
14 typedef struct {
15 void *data;
16 size_t len;
17 } git_buf_vec;
18
19 git_hash_ctx *git_hash_new_ctx(void);
20 void git_hash_free_ctx(git_hash_ctx *ctx);
21
22 void git_hash_init(git_hash_ctx *c);
23 void git_hash_update(git_hash_ctx *c, const void *data, size_t len);
24 void git_hash_final(git_oid *out, git_hash_ctx *c);
25
26 void git_hash_buf(git_oid *out, const void *data, size_t len);
27 void git_hash_vec(git_oid *out, git_buf_vec *vec, size_t n);
28
29 #endif /* INCLUDE_hash_h__ */