Some hash support improvments

This commit is contained in:
Andrea Mazzoleni 2026-01-08 18:47:53 +01:00
parent 00dc3e6a48
commit cc2bdad335
5 changed files with 184 additions and 25 deletions

View file

@ -191,6 +191,16 @@ void crc32c_init(void);
#define HASH_SPOOKY2 2
#define HASH_METRO 3
/**
* Return the hash that is expected to be the fastest in this architecture
*/
unsigned membesthash(void);
/**
* Return the name of the hash
*/
const char* memhashname(unsigned kind);
/**
* Compute the HASH of a memory block.
* Seed is a 128 bit vector.
@ -207,6 +217,11 @@ const char* hash_config_name(unsigned kind);
*/
unsigned memdiff(const unsigned char* data1, const unsigned char* data2, size_t size);
/**
* Unit test
*/
int util_selftest(void);
/****************************************************************************/
/* lock */