Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strings: add base64UrlEncode() and base64UrlDecode() #287

Open
wants to merge 30 commits into
base: master
Choose a base branch
from

Conversation

milo
Copy link
Member

@milo milo commented Nov 30, 2022

Base64 encoding is well known. It uses alphabet of 64 chars A-Z a-z 0-9 + / and padding char =. While the A-Z a-z 0-9 chars are URL safe, the remaining + / = are not. So there is a "Base 64 Encoding with URL and Filename Safe Alphabet" as mentioned in RFC4648. This encoding replaces + by - and / by _ and drops = padding.

The base64Url encoding is for example used by JSON Web Tokens (JWT), which are used for example in Open ID Connect protocol.

The implementation is based on Appendix C of IETF draft.

dg and others added 30 commits October 13, 2022 03:21
Since PHP 8.0 ReflectionParameter::getDefaultValue() correctly returns value or throws exception when constant cannot be resolved
@dg dg force-pushed the master branch 2 times, most recently from 38d3044 to a3ce3eb Compare September 27, 2023 09:53
@dg dg force-pushed the master branch 2 times, most recently from 38cc5db to 0a8a17e Compare October 17, 2023 08:26
@dg dg force-pushed the master branch 5 times, most recently from 4b7b01e to 494d200 Compare November 1, 2023 20:33
@dg dg force-pushed the master branch 5 times, most recently from b843c77 to 77e9645 Compare November 26, 2023 23:02
@dg dg force-pushed the master branch 7 times, most recently from 7ae8df7 to 0d1508c Compare December 5, 2023 14:51
@dg dg force-pushed the master branch 3 times, most recently from 5b5c893 to 81e3e6d Compare January 17, 2024 16:51
@dg dg force-pushed the master branch 2 times, most recently from b080db7 to d668e02 Compare May 3, 2024 11:20
@dg dg force-pushed the master branch 4 times, most recently from 1e73622 to d6a9961 Compare May 16, 2024 20:06
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.

None yet

2 participants