Skip to content

Throw an error if the padding is wrong #8

@martinheidegger

Description

@martinheidegger

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

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions