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:
@@ -298,7 +298,12 @@ known_network_id_new (const char *name, NMIwdNetworkSecurity security)
|
|||||||
static guint
|
static guint
|
||||||
known_network_id_hash (KnownNetworkId *id)
|
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
|
static gboolean
|
||||||
|
Reference in New Issue
Block a user