Module base62

Module base62 

Source
Expand description

Base62 encoding for hash output

Converts raw hash bytes to a 5-character alphanumeric string. Base62 uses: 0-9, A-Z, a-z (62 characters total)

This provides:

  • 62^5 = 916,132,832 possible combinations
  • Compact representation (5 characters)
  • Safe for all logging systems (alphanumeric only)
  • URL-safe (no special characters)

Functionsยง

seed_to_u64
Seed a hash algorithm by converting a string seed to a u64
to_base62
Convert bytes to a 5-character base62 string
u64_to_base62
Convert a u64 value to a 5-character base62 string