PJW hash: add credits
This commit is contained in:
@@ -34,7 +34,7 @@
|
||||
*
|
||||
* Return: the PJW hash.
|
||||
*/
|
||||
_pjw_inline unsigned int pjwhash(const void* key, uint length)
|
||||
_pjw_inline uint pjwhash(const void* key, uint length)
|
||||
{
|
||||
uint hash = 0, high;
|
||||
const u8 *k = key;
|
||||
|
@@ -15,6 +15,16 @@
|
||||
|
||||
#include "bits.h"
|
||||
|
||||
extern unsigned int pjwhash (const void* key, uint length)
|
||||
/**
|
||||
* unsigned int pjwhash - PJW hash function
|
||||
* @key: the key address.
|
||||
* @length: the length of key.
|
||||
*
|
||||
* This hash was created by Peter Jay Weinberger (AT&T Bell Labs):
|
||||
* https://en.wikipedia.org/wiki/PJW_hash_function
|
||||
*
|
||||
* Return: the PJW hash.
|
||||
*/
|
||||
extern uint pjwhash (const void* key, uint length);
|
||||
|
||||
#endif /* _PJWHASH_H */
|
||||
|
@@ -13,4 +13,8 @@
|
||||
|
||||
#define _pjw_inline extern
|
||||
|
||||
//#include "bits.h"
|
||||
//extern unsigned int pjwhash (const void* key, uint length);
|
||||
|
||||
#include "pjwhash.h"
|
||||
#include "pjwhash-inline.h"
|
||||
|
Reference in New Issue
Block a user