{
return blk_ctx->key_length;
}
+
+/* wrapper for XXH3_64bits, this is for Windows bacula.dll because XXH3_64bits
+ * don't show up in bacula64.def
+ */
+uint64_t bXXH3_64bits(const void* input, size_t length)
+{
+ return XXH3_64bits(input, length);
+}
+
int block_cipher_decrypt(BLOCK_CIPHER_CONTEXT *blk_ctx, int len, const char *src, char *dst);
int block_cipher_get_key_length(BLOCK_CIPHER_CONTEXT *blk_ctx);
+uint64_t bXXH3_64bits(const void* input, size_t length);
+
/* daemon.c */
void daemon_start ();
#include "bacula.h"
#include "stored.h"
-#include "lib/xxhash.h"
static const int dbglvl = 160;
uint64_t save;
memcpy(&save, b->buf+BLKHDR_CS64_OFFSET, BLKHDR_CS64_LENGTH);
memset(b->buf+BLKHDR_CS64_OFFSET, '\0', BLKHDR_CS64_LENGTH);
- BlockCheckSum64 = XXH3_64bits((uint8_t *)b->buf+BLKHDR_CS_LENGTH,
+ BlockCheckSum64 = bXXH3_64bits((uint8_t *)b->buf+BLKHDR_CS_LENGTH,
block_len-BLKHDR_CS_LENGTH);
/* restore the checksum */
memcpy(b->buf+BLKHDR_CS64_OFFSET, &save, BLKHDR_CS64_LENGTH);
ser_uint64(0x00); // the XXH3_64 checksum
if (do_checksum) {
/* Checksum whole block including the checksum with value 0x0 */
- block->CheckSum64 = XXH3_64bits((uint8_t *)block->buf,
+ block->CheckSum64 = bXXH3_64bits((uint8_t *)block->buf,
block_len);
/* update the checksum in the block header */
ser_begin(block->buf+chk_off, BLKHDR_CS64_LENGTH);
uint64_t save; /* make a copy of the xxh64 */
memcpy(&save, block->buf+chk_off, BLKHDR_CS64_LENGTH);
memset(block->buf+chk_off, '\0', BLKHDR_CS64_LENGTH);
- BlockCheckSum64 = XXH3_64bits((uint8_t *)block->buf,
+ BlockCheckSum64 = bXXH3_64bits((uint8_t *)block->buf,
block_len);
memcpy(block->buf+chk_off, &save, BLKHDR_CS64_LENGTH);
} else {