[riot-notifications] [RIOT] Bloom bytes (#176)

Oleg Hahm notifications at github.com
Mon Aug 26 23:09:30 CEST 2013


> @@ -28,19 +31,7 @@
>   * The magic of number 33 (why it works better than many other constants,
>   * prime or not) has never been adequately explained.
>   */
> -static inline unsigned long djb2_hash(const char *str)
> -{
> -    unsigned long hash;
> -    int c;
> -
> -    hash = 5381;
> -
> -    while ((c = (unsigned char) * str++)) {
> -        hash = ((hash << 5) + hash) + c;    /* hash * 33 + c */
> -    }
> -
> -    return hash;
> -}
> +uint32_t djb2_hash(const uint8_t *buf, size_t len);

Doxygen documentation...

---
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/176/files#r5990019
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20130826/4fbcade4/attachment.html>


More information about the notifications mailing list