Throw an error if the padding is wrong
Open
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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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