1
0
Fork 0
mirror of https://github.com/BLAKE3-team/BLAKE3 synced 2024-04-24 00:55:03 +02:00

add blake3_version(void) / BLAKE3_VERSION_STRING

related discussion here: https://github.com/BLAKE3-team/BLAKE3/issues/130
This commit is contained in:
Hans Henrik Bergan 2020-10-29 23:13:36 +01:00
parent 09546a677d
commit a2f9515785
2 changed files with 6 additions and 0 deletions

View File

@ -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);

View File

@ -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]);