src/third_party/blake3/blake3_*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-This is a subset of https://github.com/BLAKE3-team/BLAKE3[BLAKE3] 0.3.7 with
+This is a subset of https://github.com/BLAKE3-team/BLAKE3[BLAKE3] 1.0.0 with
the following license:
-------------------------------------------------------------------------------
#include "blake3.h"
#include "blake3_impl.h"
-const char * blake3_version(void) {
- return BLAKE3_VERSION_STRING;
-}
+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) {
extern "C" {
#endif
-#define BLAKE3_VERSION_STRING "0.3.7"
+#define BLAKE3_VERSION_STRING "1.0.0"
#define BLAKE3_KEY_LEN 32
#define BLAKE3_OUT_LEN 32
#define BLAKE3_BLOCK_LEN 64
#define BLAKE3_CHUNK_LEN 1024
#define BLAKE3_MAX_DEPTH 54
-#define BLAKE3_MAX_SIMD_DEGREE 16
// This struct is a private implementation detail. It has to be here because
// it's part of blake3_hasher below.
uint8_t cv_stack[(BLAKE3_MAX_DEPTH + 1) * BLAKE3_OUT_LEN];
} blake3_hasher;
-const char * blake3_version(void);
+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]);
void blake3_hasher_init_derive_key(blake3_hasher *self, const char *context);
-void blake3_hasher_init_derive_key_raw(blake3_hasher *self, const void *context,
+void blake3_hasher_init_derive_key_raw(blake3_hasher *self, const void *context,
size_t context_len);
void blake3_hasher_update(blake3_hasher *self, const void *input,
size_t input_len);
movzx r8d, r8b
shl rax, 32
add r8, rax
- vmovd xmm3, r9
- vmovd xmm4, r8
+ vmovq xmm3, r9
+ vmovq xmm4, r8
vpunpcklqdq xmm3, xmm3, xmm4
vmovaps xmm2, xmmword ptr [BLAKE3_IV]
vmovups xmm8, xmmword ptr [rdx]
mov r10, qword ptr [rsp+78H]
shl rax, 32
add r8, rax
- vmovd xmm3, r9
- vmovd xmm4, r8
+ vmovq xmm3, r9
+ vmovq xmm4, r8
vpunpcklqdq xmm3, xmm3, xmm4
vmovaps xmm2, xmmword ptr [BLAKE3_IV]
vmovups xmm8, xmmword ptr [rdx]
pshufd xmm15, xmm11, 0x93
shl rax, 0x20
or rax, 0x40
- movd xmm3, rax
+ movq xmm3, rax
movdqa xmmword ptr [rsp+0x20], xmm3
movaps xmm3, xmmword ptr [rsp]
movaps xmm11, xmmword ptr [rsp+0x10]
movaps xmm2, xmmword ptr [BLAKE3_IV+rip]
shl rax, 32
or rax, 64
- movd xmm12, rax
+ movq xmm12, rax
movdqa xmm3, xmm13
punpcklqdq xmm3, xmm12
movups xmm4, xmmword ptr [r8+rdx-0x40]
pshufd xmm15, xmm11, 0x93
shl rax, 0x20
or rax, 0x40
- movd xmm3, rax
+ movq xmm3, rax
movdqa xmmword ptr [rsp+0x20], xmm3
movaps xmm3, xmmword ptr [rsp]
movaps xmm11, xmmword ptr [rsp+0x10]
movaps xmm2, xmmword ptr [BLAKE3_IV+rip]
shl rax, 32
or rax, 64
- movd xmm12, rax
+ movq xmm12, rax
movdqa xmm3, xmm13
punpcklqdq xmm3, xmm12
movups xmm4, xmmword ptr [r8+rdx-0x40]