From 00242319e5039ec4d8e2edabbaa6ee8b2eb91e06 Mon Sep 17 00:00:00 2001 From: Joel Rosdahl Date: Sun, 23 Jan 2022 20:58:56 +0100 Subject: [PATCH] bump: Upgrade to BLAKE3 1.3.0 --- src/third_party/blake3/blake3.c | 5 +++++ src/third_party/blake3/blake3.h | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/third_party/blake3/blake3.c b/src/third_party/blake3/blake3.c index 20b6bd04c..1239433c6 100644 --- a/src/third_party/blake3/blake3.c +++ b/src/third_party/blake3/blake3.c @@ -609,3 +609,8 @@ void blake3_hasher_finalize_seek(const blake3_hasher *self, uint64_t seek, } output_root_bytes(&output, seek, out, out_len); } + +void blake3_hasher_reset(blake3_hasher *self) { + chunk_state_reset(&self->chunk, self->key, 0); + self->cv_stack_len = 0; +} diff --git a/src/third_party/blake3/blake3.h b/src/third_party/blake3/blake3.h index c3ca22da3..079f5657c 100644 --- a/src/third_party/blake3/blake3.h +++ b/src/third_party/blake3/blake3.h @@ -8,7 +8,7 @@ extern "C" { #endif -#define BLAKE3_VERSION_STRING "1.2.0" +#define BLAKE3_VERSION_STRING "1.3.0" #define BLAKE3_KEY_LEN 32 #define BLAKE3_OUT_LEN 32 #define BLAKE3_BLOCK_LEN 64 @@ -51,6 +51,7 @@ void blake3_hasher_finalize(const blake3_hasher *self, uint8_t *out, size_t out_len); void blake3_hasher_finalize_seek(const blake3_hasher *self, uint64_t seek, uint8_t *out, size_t out_len); +void blake3_hasher_reset(blake3_hasher *self); #ifdef __cplusplus } -- 2.47.2