-/* generate a new fresh 'uuid' */
-static void new_uuid(char uuid[SIZEUUID])
-{
- uuid_t newuuid;
- uuid_generate(newuuid);
- uuid_unparse_lower(newuuid, uuid);
-}
-
-/*
- * Returns a tiny hash value for the 'text'.
- *
- * Tiny hash function inspired from pearson
- */
-static uint8_t pearson4(const char *text)
-{
- static uint8_t T[16] = {
- 4, 1, 6, 0, 9, 14, 11, 5,
- 2, 3, 12, 15, 10, 7, 8, 13
- };
- uint8_t r, c;
-
- for (r = 0; (c = (uint8_t)*text) ; text++) {
- r = T[r ^ (15 & c)];
- r = T[r ^ (c >> 4)];
- }
- return r; // % HEADCOUNT;
-}
-