summary refs log tree commit diff
path: root/shared/c-siphash/src/c-siphash.h
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2018-05-11 22:08:45 +0200
committerMichael Biebl <biebl@debian.org>2018-05-11 22:08:45 +0200
commitee9c73a923909e23a649407be77e25235d769e25 (patch)
treee21c923621fa278e737da693df9eb60ea31a6067 /shared/c-siphash/src/c-siphash.h
parentf60117b41d5433be1b4a96d82cd11d0c3dce9b63 (diff)
New upstream version 1.10.8 upstream/1.10.8
Diffstat (limited to 'shared/c-siphash/src/c-siphash.h')
-rw-r--r--shared/c-siphash/src/c-siphash.h60
1 files changed, 0 insertions, 60 deletions
diff --git a/shared/c-siphash/src/c-siphash.h b/shared/c-siphash/src/c-siphash.h
deleted file mode 100644
index c0cfc1e0..00000000
--- a/shared/c-siphash/src/c-siphash.h
+++ /dev/null
@@ -1,60 +0,0 @@
-#pragma once
-
-/**
- * Streaming-capable SipHash Implementation
- *
- * This library provides a SipHash API, that is fully implemented in ISO-C11
- * and has no external dependencies. The library performs no memory allocation,
- * and provides a streaming API where data to be hashed can be appended
- * piecemeal.
- *
- * A streaming-capable hash state is represented by the "CSipHash" structure,
- * which should be initialized with a unique seed before use. If streaming
- * capabilities are not required, c_siphash_hash() provides a simple one-shot
- * API.
- */
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <stddef.h>
-#include <stdint.h>
-
-typedef struct CSipHash CSipHash;
-
-/**
- * struct CSipHash - SipHash state object
- * @v0-@v3:             internal state
- * @padding:            pending bytes that were not a multiple of 8
- * @n_bytes:            number of hashed bytes
- *
- * The state of an inflight hash is represenetd by a CSipHash object. Before
- * hashing, it must be initialized with c_siphash_init(), providing a unique
- * random hash seed. Data is hashed by appending it to the state object, using
- * c_siphash_append(). Finally, the hash is read out by calling
- * c_siphash_finalize().
- *
- * This state object has no allocated resources. It is safe to release its
- * backing memory without any further action.
- */
-struct CSipHash {
-        uint64_t v0;
-        uint64_t v1;
-        uint64_t v2;
-        uint64_t v3;
-        uint64_t padding;
-        size_t n_bytes;
-};
-
-#define C_SIPHASH_NULL {}
-
-void c_siphash_init(CSipHash *state, const uint8_t seed[16]);
-void c_siphash_append(CSipHash *state, const uint8_t *bytes, size_t n_bytes);
-uint64_t c_siphash_finalize(CSipHash *state);
-
-uint64_t c_siphash_hash(const uint8_t seed[16], const uint8_t *bytes, size_t n_bytes);
-
-#ifdef __cplusplus
-}
-#endif