Skip to main content

Module encoding

Module encoding 

Source
Expand description

The two textual representations of a Hash.

Both encode the same HASH_SIZE_BIN-byte internal representation and differ only in alphabet:

  • crockford is the canonical form: case-insensitive, and free of the ambiguous glyphs I, L, O, and U.
  • base64 is the compact form, using the URL-safe alphabet.

Their encoded lengths differ, which is what lets Hash::validate tell them apart by length alone.

Modulesยง

base64
The compact base64url representation.
crockford
The canonical Crockford Base32 representation.