Zrythm
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
hash.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: © 2021-2022 Alexandros Theodotou <alex@zrythm.org>
2// SPDX-License-Identifier: LicenseRef-ZrythmLicense
3
10#ifndef __UTILS_HASH_H__
11#define __UTILS_HASH_H__
12
13#include <cstdint>
14
15#include <xxhash.h>
16
23typedef enum HashAlgorithm
24{
25 HASH_ALGORITHM_XXH32,
26 HASH_ALGORITHM_XXH3_64,
27} HashAlgorithm;
28
29char *
30hash_get_from_file (const char * filepath, HashAlgorithm algo);
31
32uint32_t
33hash_get_from_file_simple (const char * filepath);
34
35void *
36hash_create_state (void);
37
38void
39hash_free_state (void * in_state);
40
41uint32_t
42hash_get_for_struct_full (
43 XXH32_state_t * state,
44 const void * const obj,
45 size_t size);
46
47uint32_t
48hash_get_for_struct (const void * const obj, size_t size);
49
54#endif