Skip to content

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

Open
milo wants to merge 30 commits intonette:masterfrom
milo:pull-base64Url
Open

Strings: add base64UrlEncode() and base64UrlDecode()#287
milo wants to merge 30 commits intonette:masterfrom
milo:pull-base64Url

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 4 times, most recently from b7ba1eb to 6baaf47 Compare January 26, 2023 14:52
@dg dg force-pushed the master branch 10 times, most recently from 4947deb to cacdbf5 Compare February 2, 2023 10:45
@dg dg force-pushed the master branch 2 times, most recently from 6ab8350 to d7c440e Compare March 28, 2023 16:23
@dg dg force-pushed the master branch 7 times, most recently from b724dd7 to c7ec447 Compare July 30, 2023 15:42
@dg dg force-pushed the master branch 2 times, most recently from 3e4da44 to 089bddf Compare August 22, 2023 15:02
@dg dg force-pushed the master branch 2 times, most recently from fac1545 to cddcabd Compare August 29, 2023 21:58
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.

2 participants