Fixed memory leaks in test suite
[libgit2.git] / src / hash.h
blobb371c056bb696430f0dfcef0d5e2bf62944ff323
1 /*
2 * hash.h
3 */
4 #ifndef INCLUDE_hash_h__
5 #define INCLUDE_hash_h__
7 #include "git/oid.h"
9 typedef struct git_hash_ctx git_hash_ctx;
11 typedef struct {
12 void *data;
13 size_t len;
14 } git_buf_vec;
16 git_hash_ctx *git_hash_new_ctx(void);
17 void git_hash_free_ctx(git_hash_ctx *ctx);
19 void git_hash_init(git_hash_ctx *c);
20 void git_hash_update(git_hash_ctx *c, const void *data, size_t len);
21 void git_hash_final(git_oid *out, git_hash_ctx *c);
23 void git_hash_buf(git_oid *out, const void *data, size_t len);
24 void git_hash_vec(git_oid *out, git_buf_vec *vec, size_t n);
26 #endif /* INCLUDE_hash_h__ */