2 * Copyright 2020 Google LLC
4 * Use of this source code is governed by a BSD-style
5 * license that can be found in the LICENSE file or at
6 * https://developers.google.com/open-source/licenses/bsd
9 #ifndef REFTABLE_BASICS_H
10 #define REFTABLE_BASICS_H
15 * Hash functions understood by the reftable library. Note that the values are
16 * arbitrary and somewhat random such that we can easily detect cases where the
17 * hash hasn't been properly set up.
20 REFTABLE_HASH_SHA1
= 89,
21 REFTABLE_HASH_SHA256
= 247,
23 #define REFTABLE_HASH_SIZE_SHA1 20
24 #define REFTABLE_HASH_SIZE_SHA256 32
25 #define REFTABLE_HASH_SIZE_MAX REFTABLE_HASH_SIZE_SHA256
27 /* Overrides the functions to use for memory management. */
28 void reftable_set_alloc(void *(*malloc
)(size_t),
29 void *(*realloc
)(void *, size_t), void (*free
)(void *));