From ccf36ff4cea6eb6a7ecd872563dfbd3a00f8cfdf Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Wed, 5 Sep 2018 12:22:32 +0200 Subject: [PATCH] wifi/iwd: use NMHashState (siphash24) for hashing We shall use nm_hash_*() functions everywhere where we need a hash for a dictionary. --- src/devices/wifi/nm-iwd-manager.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/devices/wifi/nm-iwd-manager.c b/src/devices/wifi/nm-iwd-manager.c index 8ff3b98452..bdfff05c33 100644 --- a/src/devices/wifi/nm-iwd-manager.c +++ b/src/devices/wifi/nm-iwd-manager.c @@ -298,7 +298,12 @@ known_network_id_new (const char *name, NMIwdNetworkSecurity security) static guint known_network_id_hash (KnownNetworkId *id) { - return g_str_hash (id->name) + id->security; + NMHashState h; + + nm_hash_init (&h, 1947951703u); + nm_hash_update_val (&h, id->security); + nm_hash_update_str (&h, id->name); + return nm_hash_complete (&h); } static gboolean