LinusU / LinusU/base32-decode

Throw an error if the padding is wrong

Open
#8 0 comments 0 reactions 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

Looking at other base32 implementations, it seems that others throw an error if the padding is not of the expected size.

```javascript
try {
base32_decode('MY====='/*=*/, 'RFC4648')
} catch (err) {
// Error('Invalid padding 6 expected 5 received')
}
```

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 base32_decode entry point and reproduce the RFC4648 example with six padding characters. Trace how padding is currently handled, then verify that an invalid padding length raises an error reporting the expected and received sizes.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.