diff options
| author | Samuel Neves <[email protected]> | 2020-10-30 12:34:41 +0000 |
|---|---|---|
| committer | GitHub <[email protected]> | 2020-10-30 12:34:41 +0000 |
| commit | fdce1eb7833cbb9bbc98a3c384b4bc240006aa44 (patch) | |
| tree | 0e5f014623ccf40e6c9565b75066cce38472c069 | |
| parent | 09546a677d4949b1ea5a7d289581ca0141971021 (diff) | |
| parent | a2f95157859a9e215500051722bca264c33f3b03 (diff) | |
Merge pull request #131 from divinity76/blake3-version-function
add blake3_version(void) / BLAKE3_VERSION_STRING
| -rw-r--r-- | c/blake3.c | 4 | ||||
| -rw-r--r-- | c/blake3.h | 2 |
2 files changed, 6 insertions, 0 deletions
@@ -5,6 +5,10 @@ #include "blake3.h" #include "blake3_impl.h" +const char * blake3_version(void) { + return BLAKE3_VERSION_STRING; +} + INLINE void chunk_state_init(blake3_chunk_state *self, const uint32_t key[8], uint8_t flags) { memcpy(self->cv, key, BLAKE3_KEY_LEN); @@ -8,6 +8,7 @@ extern "C" { #endif +#define BLAKE3_VERSION_STRING "0.3.7" #define BLAKE3_KEY_LEN 32 #define BLAKE3_OUT_LEN 32 #define BLAKE3_BLOCK_LEN 64 @@ -38,6 +39,7 @@ typedef struct { uint8_t cv_stack[(BLAKE3_MAX_DEPTH + 1) * BLAKE3_OUT_LEN]; } blake3_hasher; +const char * blake3_version(void); void blake3_hasher_init(blake3_hasher *self); void blake3_hasher_init_keyed(blake3_hasher *self, const uint8_t key[BLAKE3_KEY_LEN]); |
