#ifndef UCX_HASH_KEY_H
#define UCX_HASH_KEY_H
#include "common.h"
#ifdef __cplusplus
extern "C" {
#endif
struct cx_hash_key_s {
void const *data;
size_t len;
unsigned hash;
};
typedef struct cx_hash_key_s CxHashKey;
void cx_hash_murmur(CxHashKey *key);
__attribute__((__warn_unused_result__))
CxHashKey cx_hash_key_str(
char const *str);
__attribute__((__warn_unused_result__))
CxHashKey cx_hash_key_bytes(
unsigned char const *bytes,
size_t len
);
__attribute__((__warn_unused_result__))
CxHashKey cx_hash_key(
void const *obj,
size_t len
);
#define cx_hash_key_cxstr(str) cx_hash_key((
void*)(str).ptr, (str).length)
#ifdef __cplusplus
}
#endif
#endif