LinusU / LinusU/base32-decode

Hyphens and check symbols are also valid in Crockford’s base 32.

Open
#4 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
9
Forks
4
PR merge metrics
No merged PRs in 30d

Description

> Hyphens (`-`) can be inserted into symbol strings. This can partition a string into manageable pieces, improving readability by helping to prevent confusion. Hyphens are ignored during decoding. An application may look for hyphens to assure symbol string correctness.
>
> — https://www.crockford.com/base32.html

> An application may append a check symbol to a symbol string. This check symbol can be used to detect wrong-symbol and transposed-symbol errors. This allows for detecting transmission and entry errors early and inexpensively.
>
> The check symbol encodes the number modulo 37, 37 being the least prime number greater than 32. We introduce 5 additional symbols that are used only for encoding or decoding the check symbol.
>
> The additional symbols were selected to not be confused with punctuation or with URL formatting.
>
> `0123456789ABCDEFGHJKMNPQRSTVWXYZ` `*~$=U`
>
> — https://www.crockford.com/base32.html

Have it ignore `-`, `*`, `~`, `$`, `=`, `U`, and `u` in your inputs.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the package's JavaScript decoder entry point and review how input symbols are handled. Verify that hyphens and the listed check-symbol characters are handled as requested, including both uppercase and lowercase U, with tests covering these inputs.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
tooling
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.