30 lines
690 B
C
30 lines
690 B
C
// vim:fileencoding=utf-8:foldmethod=marker
|
|
|
|
/**
|
|
* Implementations of the SipHash-2-4-128, SipHash4-8-128 algorithms based on
|
|
* https://github.com/veorq/SipHash/blob/master/siphash.c
|
|
*/
|
|
|
|
#ifndef SIPHASH_H
|
|
#define SIPHASH_H
|
|
|
|
#include "hasher.h"
|
|
#include "../../stream/stream.h"
|
|
#include "../../../common/platform/platform.h"
|
|
|
|
#ifdef WP_PLATFORM_CPP
|
|
BEGIN_C_LINKAGE
|
|
#endif // !WP_PLATFORM_CPP
|
|
|
|
WpHasher wpSip24Hasher(void);
|
|
WpHasher wpSip48Hasher(void);
|
|
WpHasher wpSip24HasherWithKey(WpU128 key);
|
|
WpHasher wpSip48HasherWithKey(WpU128 key);
|
|
WpU128 wpSipGetHash128(WpU8Stream *bytes, WpHasherCtx ctx);
|
|
|
|
#ifdef WP_PLATFORM_CPP
|
|
END_C_LINKAGE
|
|
#endif // !WP_PLATFORM_CPP
|
|
|
|
#endif // !SIPHASH_H
|