mirror of
https://github.com/amadvance/snapraid.git
synced 2026-12-01 20:36:38 -05:00
Some hash support improvments
This commit is contained in:
parent
00dc3e6a48
commit
cc2bdad335
5 changed files with 184 additions and 25 deletions
|
|
@ -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 */
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue