summaryrefslogtreecommitdiff
path: root/src/basic
diff options
context:
space:
mode:
Diffstat (limited to 'src/basic')
-rw-r--r--src/basic/hashmap.c2
-rw-r--r--src/basic/siphash24.c4
-rw-r--r--src/basic/siphash24.h4
3 files changed, 5 insertions, 5 deletions
diff --git a/src/basic/hashmap.c b/src/basic/hashmap.c
index 4109a08c6c..d88ceb40aa 100644
--- a/src/basic/hashmap.c
+++ b/src/basic/hashmap.c
@@ -380,7 +380,7 @@ static unsigned base_bucket_hash(HashmapBase *h, const void *p) {
h->hash_ops->hash(p, &state);
- siphash24_finalize((uint8_t*)&hash, &state);
+ siphash24_finalize(&hash, &state);
return (unsigned) (hash % n_buckets(h));
}
diff --git a/src/basic/siphash24.c b/src/basic/siphash24.c
index 1da2d1a410..d7640d395d 100644
--- a/src/basic/siphash24.c
+++ b/src/basic/siphash24.c
@@ -141,7 +141,7 @@ void siphash24_compress(const void *_in, size_t inlen, struct siphash *state) {
}
}
-void siphash24_finalize(uint8_t out[8], struct siphash *state) {
+void siphash24_finalize(uint64_t *out, struct siphash *state) {
uint64_t b;
b = state->padding | (( ( uint64_t )state->inlen ) << 56);
@@ -174,7 +174,7 @@ void siphash24_finalize(uint8_t out[8], struct siphash *state) {
}
/* SipHash-2-4 */
-void siphash24(uint8_t out[8], const void *_in, size_t inlen, const uint8_t k[16]) {
+void siphash24(uint64_t *out, const void *_in, size_t inlen, const uint8_t k[16]) {
struct siphash state;
siphash24_init(&state, k);
diff --git a/src/basic/siphash24.h b/src/basic/siphash24.h
index 6c5cd98ee8..dc08077d53 100644
--- a/src/basic/siphash24.h
+++ b/src/basic/siphash24.h
@@ -14,6 +14,6 @@ struct siphash {
void siphash24_init(struct siphash *state, const uint8_t k[16]);
void siphash24_compress(const void *in, size_t inlen, struct siphash *state);
-void siphash24_finalize(uint8_t out[8], struct siphash *state);
+void siphash24_finalize(uint64_t *out, struct siphash *state);
-void siphash24(uint8_t out[8], const void *in, size_t inlen, const uint8_t k[16]);
+void siphash24(uint64_t *out, const void *in, size_t inlen, const uint8_t k[16]);