Wyhash et Wyrand sont la fonction de hachage 64 bits idéale respectivement: respectivement:
Solide : Wyhash a passé Smhasher, Wyrand a passé Bigcrush, Practrand.
Portable : système 64 bits / 32 bits, Big / Little Endian.
Le plus rapide : efficace sur les machines 64 bits, en particulier pour les clés courtes.
Plus simple : dans le sens de la taille du code.
Salé : Nous utilisons un secret dynamique pour éviter les attaques prévues.
Wyhash est l'algorithme de hachage par défaut de la langue des grands zig, V, Nim et Go (depuis 1.17). Un jalon est que Wyhash a déployé par Microsoft sur [Terminal Windows] (Microsoft / Terminal # 13686).
Exemple simple:
#include "wyhash.h"
uint64_t _wyp[4];
make_secret(time(NULL),_wyp);
string s="fcdskhfjs";
uint64_t h=wyhash(s.c_str(),s.size(),0,_wyp);
Limites:
On sait maintenant que Wyhash / Wyrand ont leurs limites:
Les deux ne sont pas résistants aux collisions à 64 bits, mais c'est environ 62 bits (Flyingmutant / Cyan4973 / Vigna)
Lors du test sur un ensemble de données plus long (32 To, 23 jours), Wyrand échouera au practrand (Vigna)
Et il peut y avoir plus de défauts détectés à l'avenir.
L'utilisateur doit prendre sa propre décision basée sur l'avantage et les défauts de Wyhash / Wyrand car personne n'est parfait.
C # https://github.com/cocowalla/wyhash-dotnet
C ++ https://github.com/tommyettinger/waterhash
C ++ https://github.com/alainesp/wy
Allez https://github.com/dgryski/go-wyhash
Aller https://github.com/orisano/wyhash
Allez https://github.com/littleli/go-wyhash16
Allez https://github.com/zeebo/wyhash
Allez https://github.com/lonewolf3739/wyhash-go
Allez https://github.com/zhangyunhao116/wyhash (version finale 1 && 3)
Java https://github.com/openhft/zero-allocation-hashing
Java https://github.com/dynatrace-oss/hash4j (version finale 3 et 4)
KOTLIN MultipLatform https://github.com/appmattus/crypto/tree/main/cryptohash
Nim https://github.com/nim-lang/nim/blob/devel/lib/pure/hashes.nim
Nim https://github.com/jackhftang/wyhash.nim
Nim https://github.com/littleli/nim-wyhash16
Rust https://github.com/eldruin/wyhash-rs
Swift https://github.com/lemire/swiftwyhash
Swift https://github.com/lemire/swiftwyhashbenchmark
Swift https://github.com/jeudesprits/pswyhash
V https://github.com/vlang/v/tree/master/vlib/hash/wyhash (v4)
Zig https://github.com/mandejan/zig-wyhash
ABSL Hashmap https://github.com/abseil/abseil-cpp/blob/master/absl/hash/internal/low_level_hash.h
Je remercie ces noms:
Reini urbain
Dietrich Epp
Joshua Haberman
Tommy Ettinger
Daniel Lemire
Otmar ertl
cocowalla
leo-yuriev
Diego Barrios Romero
paulie-g
dumblob
Yann Collet
ivte-ms
hyb
James ZM Gao
Easyaspi314 (Devin)
Theonérique
mutant volant
vign
tansie