Debian Codegraph @

external/blake3/blake3.h

raw symbols SCIP
1 #cxx . . $ `<file>/external/blake3/blake3.h`/ifndef BLAKE3_H
2 #define BLAKE3_Hcxx . . $ `external/blake3/blake3.h:2:9`!
3
4 #include <stddef.h>
5 #include <stdint.h>
6
7
8 #undef BLAKE3_USE_TBB
9 #define BLAKE3_NO_SSE2cxx . . $ `external/blake3/blake3.h:9:9`!
10 #define BLAKE3_NO_SSE41cxx . . $ `external/blake3/blake3.h:10:9`!
11 #define BLAKE3_NO_AVX2cxx . . $ `external/blake3/blake3.h:11:9`!
12 #define BLAKE3_NO_AVX512cxx . . $ `external/blake3/blake3.h:12:9`!
13 #define BLAKE3_USE_NEONcxx . . $ `external/blake3/blake3.h:13:9`! 0
14
15 #if !defined(BLAKE3_API)
16 # if defined(_WIN32) || defined(__CYGWIN__)
17 # if defined(BLAKE3_DLL)
18 # if defined(BLAKE3_DLL_EXPORTS)
19 # define BLAKE3_API __declspec(dllexport)
20 # else
21 # define BLAKE3_API __declspec(dllimport)
22 # endif
23 # define BLAKE3_PRIVATE
24 # else
25 # define BLAKE3_API
26 # define BLAKE3_PRIVATE
27 # endif
28 # elif __GNUC__cxx . . $ `<built-in>:8:9`! >= 4
29 # define BLAKE3_APIcxx . . $ `external/blake3/blake3.h:29:12`! __attribute__((visibility("default")))
30 # define BLAKE3_PRIVATEcxx . . $ `external/blake3/blake3.h:30:12`! __attribute__((visibility("hidden")))
31 # else
32 # define BLAKE3_API
33 # define BLAKE3_PRIVATE
34 # endif
35 #endif
36
37 #ifdef __cpluspluscxx . . $ `<built-in>:470:9`!
38 extern "C" {
39 #endif
40
41 #define BLAKE3_VERSION_STRINGcxx . . $ `external/blake3/blake3.h:41:9`! "1.8.5"
42 #define BLAKE3_KEY_LENcxx . . $ `external/blake3/blake3.h:42:9`! 32
43 #define BLAKE3_OUT_LENcxx . . $ `external/blake3/blake3.h:43:9`! 32
44 #define BLAKE3_BLOCK_LENcxx . . $ `external/blake3/blake3.h:44:9`! 64
45 #define BLAKE3_CHUNK_LENcxx . . $ `external/blake3/blake3.h:45:9`! 1024
46 #define BLAKE3_MAX_DEPTHcxx . . $ `external/blake3/blake3.h:46:9`! 54
47
48 // This struct is a private implementation detail. It has to be here because
49 // it's part of the blake3_hasher structure defined below.
50 typedef struct {
51 uint32_tcxx . . $ uint32_t# cv[8];
52 uint64_tcxx . . $ uint64_t# chunk_counter;
53 uint8_tcxx . . $ uint8_t# buf[BLAKE3_BLOCK_LENcxx . . $ `external/blake3/blake3.h:44:9`!];
54 uint8_tcxx . . $ uint8_t# buf_len;
55 uint8_tcxx . . $ uint8_t# blocks_compressed;
56 uint8_tcxx . . $ uint8_t# flags;
57 } blake3_chunk_state;
58
59 typedef struct {
60 uint32_tcxx . . $ uint32_t# key[8];
61 blake3_chunk_state chunk;
62 uint8_tcxx . . $ uint8_t# cv_stack_len;
63 // The stack size is MAX_DEPTH + 1 because we do lazy merging. For example,
64 // with 7 chunks, we have 3 entries in the stack. Adding an 8th chunk
65 // requires a 4th entry, rather than merging everything down to 1, because we
66 // don't know whether more input is coming. This is different from how the
67 // reference implementation does things.
68 uint8_tcxx . . $ uint8_t# cv_stack[(BLAKE3_MAX_DEPTHcxx . . $ `external/blake3/blake3.h:46:9`! + 1) * BLAKE3_OUT_LENcxx . . $ `external/blake3/blake3.h:43:9`!];
69 } blake3_hasher;
70
71 BLAKE3_APIcxx . . $ `external/blake3/blake3.h:29:12`! const char *blake3_version(void);
72 BLAKE3_APIcxx . . $ `external/blake3/blake3.h:29:12`! void blake3_hasher_init(blake3_hasher *self);
73 BLAKE3_APIcxx . . $ `external/blake3/blake3.h:29:12`! void blake3_hasher_init_keyed(blake3_hasher *self,
74 const uint8_tcxx . . $ uint8_t# key[BLAKE3_KEY_LENcxx . . $ `external/blake3/blake3.h:42:9`!]);
75 BLAKE3_APIcxx . . $ `external/blake3/blake3.h:29:12`! void blake3_hasher_init_derive_key(blake3_hasher *self, const char *context);
76 BLAKE3_APIcxx . . $ `external/blake3/blake3.h:29:12`! void blake3_hasher_init_derive_key_raw(blake3_hasher *self, const void *context,
77 size_t context_len);
78 BLAKE3_APIcxx . . $ `external/blake3/blake3.h:29:12`! void blake3_hasher_update(blake3_hasher *self, const void *input,
79 size_t input_len);
80 #if defined(BLAKE3_USE_TBB)
81 BLAKE3_API void blake3_hasher_update_tbb(blake3_hasher *self, const void *input,
82 size_t input_len);
83 #endif // BLAKE3_USE_TBB
84 BLAKE3_APIcxx . . $ `external/blake3/blake3.h:29:12`! void blake3_hasher_finalize(const blake3_hasher *self, uint8_tcxx . . $ uint8_t# *out,
85 size_t out_len);
86 BLAKE3_APIcxx . . $ `external/blake3/blake3.h:29:12`! void blake3_hasher_finalize_seek(const blake3_hasher *self, uint64_tcxx . . $ uint64_t# seek,
87 uint8_tcxx . . $ uint8_t# *out, size_t out_len);
88 BLAKE3_APIcxx . . $ `external/blake3/blake3.h:29:12`! void blake3_hasher_reset(blake3_hasher *self);
89
90 #ifdef __cpluspluscxx . . $ `<built-in>:470:9`!
91 }
92 #endif
93
94 #endif /* BLAKE3_H */