Skip to content

fix calculation of pad bits length while decoding - #18

Open
pomu0325 wants to merge 1 commit into
stesla:masterfrom
pomu0325:pad-bits-len
Open

fix calculation of pad bits length while decoding#18
pomu0325 wants to merge 1 commit into
stesla:masterfrom
pomu0325:pad-bits-len

Conversation

@pomu0325

@pomu0325 pomu0325 commented Sep 23, 2021

Copy link
Copy Markdown

Current implementation returns incorrect pad bits length when the base32 encoded string has a redundant character.
Specifically, in cases base32 encoded string's length is 3 (15bits) or 6 (30bits).
(I know these length of strings are not properly encoded, though)

p = bytes.length < 8 ? 5 - (n * 8) % 5 : 0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant