Skip to content

support crockford base32, Base-X base58, base62 #33

@coolaj86

Description

@coolaj86

The use case for Base32 is to provide something that's easier to write down and re-enter correctly - otherwise you'd always use base64. Base-N Base32 does not accomplish this. Crockford Base32 does (and another one I'm forgetting at the moment).

For this reason, the Base-N version of Base32 is rarely used. Almost always (survey other base32 libraries) it's Crockford Base32, which ensures that there are no ambiguous combinations - such as 0 and O, etc.

A few other bases that are popular in certain niches:

  • Crockford Base32
  • Base-X Base58 is used for cryptocurrency addresses and follows the same principles as Crockford Base32 in regards to character selection, but is also generic to arbitrary bit-widths (due to Base-X implementation)
    • Base58Check (the standard for how this is used in practice: Base58(Magic Bytes (Version) + Data + Checksum)
  • Base62 is used for prefixed & checksummed access tokens (e.g. GitHub, npm, Digital Ocean, etc)
    • Base62Check an informal name for actual way tokens are generated: Prefix + Base62(Entropy + Checksum)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions