🦆 waddling-errors-hash
WDP-compliant xxHash3 computation for diagnostic codes.
What It Does
Converts error codes to compact 5-character hashes per WDP Part 5.
use compute_wdp_hash;
let hash = compute_wdp_hash;
// Returns 5-char base62 hash, e.g., "V6a0B"
// Case-insensitive (WDP normalization):
assert_eq!;
Installation
[]
= "0.7"
API
WDP-Conformant (Recommended)
use ;
let code_hash = compute_wdp_hash; // "V6a0B"
let ns_hash = compute_wdp_namespace_hash; // "05o5h"
let full_id = compute_wdp_full_id; // "05o5h-V6a0B"
Custom Seed
use ;
let config = with_seed;
let hash = compute_hash_with_config;
WDP Seeds
| Purpose | Seed | u64 Value |
|---|---|---|
| Error codes | "wdp-v1" |
0x000031762D706477 |
| Namespaces | "wdpns-v1" |
0x31762D736E706477 |
Cross-Language
Same algorithm works in Python, JS, Go, etc:
= 0x000031762D706477
=
Security Note
xxHash3 is NOT cryptographically secure. It's designed for speed and distribution quality. Use TLS/JWT for security requirements.
Documentation
License
MIT or Apache-2.0.