diff options
| author | Michael Biebl <biebl@debian.org> | 2019-07-31 10:52:41 +0200 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2019-07-31 10:52:41 +0200 |
| commit | 3a99ba5fd066fe42bd5461360a7411766496619c (patch) | |
| tree | b43863fbe867d7b0f9f9032fd40664c521c88fcb /shared/c-siphash/src | |
| parent | 13cfe714153013158bdf3e74ab58ab713a04223c (diff) | |
| parent | 2e5fa45ddfbb5cffa1e78221f1cea706e2f298af (diff) | |
Update upstream source from tag 'upstream/1.19.90'
Update to upstream version '1.19.90' with Debian dir 6d1a5b9902866beee1365904d425141b5d4c944c
Diffstat (limited to 'shared/c-siphash/src')
| -rw-r--r-- | shared/c-siphash/src/c-siphash.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/shared/c-siphash/src/c-siphash.c b/shared/c-siphash/src/c-siphash.c index 5cea6f2b..fae3abad 100644 --- a/shared/c-siphash/src/c-siphash.c +++ b/shared/c-siphash/src/c-siphash.c @@ -11,12 +11,11 @@ * C_siphash_finalize_Y() can be easily provided, if required. */ +#include <c-stdaux.h> #include <stddef.h> #include <stdint.h> #include "c-siphash.h" -#define _public_ __attribute__((__visibility__("default"))) - static inline uint64_t c_siphash_read_le64(const uint8_t bytes[8]) { return ((uint64_t) bytes[0]) | (((uint64_t) bytes[1]) << 8) | @@ -68,7 +67,7 @@ static inline void c_siphash_sipround(CSipHash *state) { * Right now, only SipHash24 is supported. Other SipHash parameters can be * easily added if required. */ -_public_ void c_siphash_init(CSipHash *state, const uint8_t seed[16]) { +_c_public_ void c_siphash_init(CSipHash *state, const uint8_t seed[16]) { uint64_t k0, k1; k0 = c_siphash_read_le64(seed); @@ -105,7 +104,7 @@ _public_ void c_siphash_init(CSipHash *state, const uint8_t seed[16]) { * Note that this implementation works best when used with chunk-sizes of * multiples of 64bit (8-bytes). This is not a requirement, though. */ -_public_ void c_siphash_append(CSipHash *state, const uint8_t *bytes, size_t n_bytes) { +_c_public_ void c_siphash_append(CSipHash *state, const uint8_t *bytes, size_t n_bytes) { const uint8_t *end = bytes + n_bytes; size_t left = state->n_bytes & 7; uint64_t m; @@ -195,7 +194,7 @@ _public_ void c_siphash_append(CSipHash *state, const uint8_t *bytes, size_t n_b * * Return: 64bit hash value */ -_public_ uint64_t c_siphash_finalize(CSipHash *state) { +_c_public_ uint64_t c_siphash_finalize(CSipHash *state) { uint64_t b; b = state->padding | (((uint64_t) state->n_bytes) << 56); @@ -236,7 +235,7 @@ _public_ uint64_t c_siphash_finalize(CSipHash *state) { * * Return: 64bit hash value */ -_public_ uint64_t c_siphash_hash(const uint8_t seed[16], const uint8_t *bytes, size_t n_bytes) { +_c_public_ uint64_t c_siphash_hash(const uint8_t seed[16], const uint8_t *bytes, size_t n_bytes) { CSipHash state; c_siphash_init(&state, seed); |