wifi/iwd: use NMHashState (siphash24) for hashing

We shall use nm_hash_*() functions everywhere where
we need a hash for a dictionary.
This commit is contained in:
Thomas Haller
2018-09-05 12:22:32 +02:00
parent be875fe382
commit ccf36ff4ce

View File

@@ -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