Skip to content

Bug report: Unpadded Base32 Decode Fails #2079

@quentin-k

Description

@quentin-k

Describe the bug
When decoding unpadded base32, if the base32 decode alphabet does not have a padding character decoding will return a "Data is not a valid byteArray" error.

To Reproduce

https://gchq.github.io/CyberChef/#recipe=To_Base32('0-9A-V')From_Base32('0-9A-V',true)&input=MQ

Expected behaviour
Decode output will contain 1

Desktop (if relevant, please complete the following information):

  • Version: 10.19.4
  • Compile time: 16/07/2025 07:23:08 UTC
  • User-Agent:
    Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:140.0) Gecko/20100101 Firefox/140.0
  • Link to reproduce

Additional context
Decoding works if an = is appended to the decode alphabet, it doesn't seem to work for other characters on an unpadded base32 output.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions