Skip to content

Add support for RFC 4648 base64url encoding#3380

Open
robbieg8s wants to merge 2 commits into
jqlang:masterfrom
robbieg8s:base64url
Open

Add support for RFC 4648 base64url encoding#3380
robbieg8s wants to merge 2 commits into
jqlang:masterfrom
robbieg8s:base64url

Conversation

@robbieg8s
Copy link
Copy Markdown

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