mirror of
https://github.com/zeek/zeek.git
synced 2025-10-04 07:38:19 +00:00
Move all of the hashing classes/functions to zeek::detail namespace
This commit is contained in:
parent
93948b4d19
commit
a2a435360a
40 changed files with 289 additions and 234 deletions
23
src/Hash.h
23
src/Hash.h
|
@ -36,6 +36,8 @@ namespace zeek::BifFunc {
|
|||
extern BifReturnVal md5_hmac_bif(zeek::detail::Frame* frame, const zeek::Args*);
|
||||
}
|
||||
|
||||
namespace zeek::detail {
|
||||
|
||||
typedef uint64_t hash_t;
|
||||
typedef uint64_t hash64_t;
|
||||
typedef uint64_t hash128_t[2];
|
||||
|
@ -197,7 +199,7 @@ private:
|
|||
inline static uint8_t shared_hmac_md5_key[16];
|
||||
inline static bool seeds_initialized = false;
|
||||
|
||||
friend void hmac_md5(size_t size, const unsigned char* bytes, unsigned char digest[16]);
|
||||
friend void ::hmac_md5(size_t size, const unsigned char* bytes, unsigned char digest[16]);
|
||||
friend BifReturnVal zeek::BifFunc::md5_hmac_bif(zeek::detail::Frame* frame, const zeek::Args*);
|
||||
};
|
||||
|
||||
|
@ -205,7 +207,7 @@ typedef enum {
|
|||
HASH_KEY_INT,
|
||||
HASH_KEY_DOUBLE,
|
||||
HASH_KEY_STRING
|
||||
#define NUM_HASH_KEYS (int(HASH_KEY_STRING) + 1)
|
||||
#define NUM_HASH_KEYS (int(zeek::detail::HASH_KEY_STRING) + 1)
|
||||
} HashKeyTag;
|
||||
|
||||
class HashKey {
|
||||
|
@ -276,3 +278,20 @@ protected:
|
|||
};
|
||||
|
||||
extern void init_hash_function();
|
||||
|
||||
} // namespace zeek::detail
|
||||
|
||||
using hash_t [[deprecated("Remove in v4.1. Use zeek::detail::hash_t.")]] = zeek::detail::hash_t;
|
||||
using hash64_t [[deprecated("Remove in v4.1. Use zeek::detail::hash64_t.")]] = zeek::detail::hash64_t;
|
||||
using hash128_t [[deprecated("Remove in v4.1. Use zeek::detail::hash128_t.")]] = zeek::detail::hash128_t;
|
||||
using hash256_t [[deprecated("Remove in v4.1. Use zeek::detail::hash256_t.")]] = zeek::detail::hash256_t;
|
||||
|
||||
using KeyedHash [[deprecated("Remove in v4.1. Use zeek::detail::KeyedHash.")]] = zeek::detail::KeyedHash;
|
||||
using HashKeyTag [[deprecated("Remove in v4.1. Use zeek::detail::HashKeyTag.")]] = zeek::detail::HashKeyTag;
|
||||
using HashKey [[deprecated("Remove in v4.1. Use zeek::detail::HashKey.")]] = zeek::detail::HashKey;
|
||||
|
||||
constexpr auto HASH_KEY_INT [[deprecated("Remove in v4.1. Use zeek::detail::HASH_KEY_INT.")]] = zeek::detail::HASH_KEY_INT;
|
||||
constexpr auto HASH_KEY_DOUBLE [[deprecated("Remove in v4.1. Use zeek::detail::HASH_KEY_DOUBLE.")]] = zeek::detail::HASH_KEY_DOUBLE;
|
||||
constexpr auto HASH_KEY_STRING [[deprecated("Remove in v4.1. Use zeek::detail::HASH_KEY_STRING.")]] = zeek::detail::HASH_KEY_STRING;
|
||||
|
||||
constexpr auto init_hash_function [[deprecated("Remove in v4.1. Use zeek::detail::init_hash_function.")]] = zeek::detail::init_hash_function;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue