Skip to content

Conversation

@robbieg8s
Copy link

RFC 4648 provides an alternate encoding alphabet using -_ in place of +/ to assist in produce encoded strings which do not require % encoding for including in urls. The nodejs Buffer class supports this encoding for example.

This change adds support for encoding in base64url with padding included (base64urlp) and with padding excluded (base64url). The latter is provided and named to mimic the nodejs version of this encoding.

This change permits base64d to decode either base64 or base64url. This also mimics nodejs which decodes both in either encoding.

Also, add docs and tests for this change.

RFC 4648 provides an alternate encoding alphabet using -_ in place of +/
to assist in produce encoded strings which do not require % encoding for
including in urls. The nodejs Buffer class supports this encoding for
example.

This change adds support for encoding in base64url with padding included
(base64urlp) and with padding excluded (base64url). The latter is
provided and named to mimic the nodejs version of this encoding.

This change permits base64d to decode either base64 or base64url. This
also mimics nodejs which decodes both in either encoding.

Also, add docs and tests for this change.
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