Wyhash และ Wyrand เป็นฟังก์ชันแฮช 64 บิตในอุดมคติและ PRNG ตามลำดับ:
Solid : Wyhash ผ่าน Smhasher, Wyrand ผ่าน Bigcrush, Practrand
พกพา : ระบบ 64 บิต/32 บิต, Endian ขนาดใหญ่/น้อย
เร็วที่สุด : มีประสิทธิภาพในเครื่อง 64 บิตโดยเฉพาะอย่างยิ่งสำหรับปุ่มสั้น
ง่ายที่สุด : ในแง่ของขนาดรหัส
Salted : เราใช้ความลับแบบไดนามิกเพื่อหลีกเลี่ยงการโจมตีที่ตั้งใจไว้
Wyhash เป็นอัลกอริทึมการแฮชเริ่มต้นของภาษา Great Zig, V, Nim และ Go (ตั้งแต่ 1.17) เหตุการณ์สำคัญอย่างหนึ่งคือ Wyhash ได้ปรับใช้โดย Microsoft บน [Windows Terminal] (Microsoft/Terminal#13686)
ตัวอย่างง่ายๆ:
#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);
ข้อ จำกัด :
เป็นที่ทราบกันดีว่า Wyhash/Wyrand มีข้อ จำกัด :
ทั้งคู่มีความต้านทานต่อการชนกัน 64 บิต แต่ประมาณ 62 บิต (FlyingMutant/Cyan4973/Vigna)
เมื่อทดสอบชุดข้อมูลที่ยาวขึ้น (32TB, 23 วัน), Wyrand จะล้มเหลว Practrand (Vigna)
และอาจมีข้อบกพร่องมากขึ้นในอนาคต
ผู้ใช้ควรทำการตัดสินใจของตนเองตามข้อได้เปรียบและข้อบกพร่องของ Wyhash/Wyrand เนื่องจากไม่มีใครสมบูรณ์แบบ
C# https://github.com/cocowalla/wyhash-dotnet
c ++ https://github.com/tommyettinger/waterhash
c ++ https://github.com/alainesp/wy
ไป https://github.com/dgryski/go-wyhash
ไป https://github.com/orisano/wyhash
ไป https://github.com/littleli/Go-Wyhash16
ไป https://github.com/zeebo/wyhash
ไป https://github.com/lonewolf3739/wyhash-go
ไป https://github.com/zhangyunha116/wyhash (เวอร์ชันสุดท้าย 1 && 3)
java https://github.com/openhft/zero-allocation-hashing
java https://github.com/dynatrace-oss/hash4j (รุ่นสุดท้าย 3 และ 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
ฉันขอบคุณชื่อเหล่านี้:
Reini Urban
Dietrich Epp
Joshua Haberman
Tommy Ettinger
Daniel Lemire
otmar ertl
cocowalla
ลีโอยูโร
Diego Barrios Romero
Paulie-G
คนโง่
Yann Collet
IVTE-MS
HYB
James ZM Gao
EasyAspi314 (Devin)
ที่เกี่ยวกับพวกเขา
การบิน
สะเก็ดเงิน
แทนซี