NetworkManager/shared/nm-utils
Thomas Haller 0e9e35e309 all: refactor hashing by introducing NMHashState
The privious NM_HASH_* macros directly operated on a guint value
and were thus close to the actual implementation.

Replace them by adding a NMHashState struct and accessors to
update the hash state. This hides the implementation better
and would allow us to carry more state. For example, we could
switch to siphash24() transparently.

For now, we still do a form basically djb2 hashing, albeit with
differing start seed.

Also add nm_hash_str() and nm_str_hash():

- nm_hash_str() is our own string hashing implementation

- nm_str_hash() is our own string implementation, but with a
  GHashFunc signature, suitable to pass it to g_hash_table_new().
  Also, it has this name in order to remind you of g_str_hash(),
  which it is replacing.
2017-10-18 13:05:00 +02:00
..
c-list-util.c c-list: add c_list_sort() 2017-07-25 06:42:14 +02:00
c-list-util.h c-list: add c_list_sort() 2017-07-25 06:42:14 +02:00
c-list.h shared: update c-list 2017-07-05 14:22:10 +02:00
gsystem-local-alloc.h shared: move shared files to subdirectory "shared/nm-utils/" 2016-06-16 10:45:53 +02:00
nm-dedup-multi.c all: refactor hashing by introducing NMHashState 2017-10-18 13:05:00 +02:00
nm-dedup-multi.h shared: move nm_dedup_multi_obj_ref() to header as inline 2017-09-26 19:31:17 +02:00
nm-enum-utils.c shared: cast from/to argument to unsigned for GFlags in _nm_utils_enum_get_values() 2017-04-27 18:01:58 +02:00
nm-enum-utils.h libnm: move public nm_utils_enum_*() functions back to libnm-core 2017-04-05 18:38:31 +02:00
nm-glib.h shared: add nm-glib.h compat implementation for g_variant_new_printf() 2017-09-18 20:14:09 +02:00
nm-hash-utils.c all: refactor hashing by introducing NMHashState 2017-10-18 13:05:00 +02:00
nm-hash-utils.h all: refactor hashing by introducing NMHashState 2017-10-18 13:05:00 +02:00
nm-macros-internal.h shared: add _NM_ENSURE_TYPE() macro 2017-10-17 20:02:59 +02:00
nm-obj.h all: add base object type in "nm-obj.h" 2017-07-05 14:22:10 +02:00
nm-random-utils.c shared: split random and hash utils 2017-10-17 20:02:59 +02:00
nm-random-utils.h shared: split random and hash utils 2017-10-17 20:02:59 +02:00
nm-shared-utils.c shared: split random and hash utils 2017-10-17 20:02:59 +02:00
nm-shared-utils.h shared: split random and hash utils 2017-10-17 20:02:59 +02:00
nm-test-utils.h test: redirect glib logging to stdout 2017-08-12 16:02:11 +02:00
nm-udev-utils.c libnm: don't cunescape \x00 encoding in nm_udev_utils_property_decode() 2017-05-19 09:46:08 +02:00
nm-udev-utils.h udev: add and use nm_udev_utils_property_decode() function 2017-03-22 12:41:06 +01:00
nm-vpn-editor-plugin-call.h shared: include "gsystem-local-alloc.h" from "nm-glib.h" 2016-06-16 10:45:54 +02:00
nm-vpn-plugin-macros.h shared: add nm_utils_syslog_coerce_from_nm() util 2016-09-19 15:35:33 +02:00
nm-vpn-plugin-utils.c shared: add "nm-utils/nm-vpn-plugin-utils.h" 2016-06-16 10:45:54 +02:00
nm-vpn-plugin-utils.h shared: add "nm-utils/nm-vpn-plugin-utils.h" 2016-06-16 10:45:54 +02:00
unaligned.h shared: add unaligned.h 2016-10-14 11:16:13 +02:00