-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Add Base64.IsValid and allow Base64.DecodeXx methods to skip whitespace #85938
Conversation
This includes making FromBase64Transform significantly faster via SearchValues.
Added When you commit this breaking change:
Tagging @dotnet/compat for awareness of the breaking change. |
Note regarding the This serves as a reminder for when your PR is modifying a ref *.cs file and adding/modifying public APIs, please make sure the API implementation in the src *.cs file is documented with triple slash comments, so the PR reviewers can sign off that change. |
Tagging subscribers to this area: @dotnet/area-system-memory Issue DetailsCherrypicks, addresses merge conflicts, and squashes the commits from @heathbm in #79334, then adds an additional commit to clean up a few things in the src. Fixes #76020 @bartonjs, I looked at PemEncoding.TryFind, which is what drove us to add the decodingLength outs to IsValid, but it seems that implementation also needs to be able to find a base64-encoded value within the region rather than validating the whole thing?
|
src/libraries/System.Private.CoreLib/src/System/Buffers/Text/Base64Decoder.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Private.CoreLib/src/System/Buffers/Text/Base64Decoder.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Private.CoreLib/src/System/Buffers/Text/Base64Validator.cs
Outdated
Show resolved
Hide resolved
Breaking change doc issue: |
Failures are #85949 |
On closer look, seems it's just trimming whitespace in a somewhat convoluted manner. I'll submit a PR to replace it with this. |
Cherrypicks, addresses merge conflicts, and squashes the commits from @heathbm in #79334, then adds an additional commit to clean up a few things in the src.
Fixes #76020
cc: @gfoidl, @MihaZupan, @tarekgh
@bartonjs, I looked at PemEncoding.TryFind, which is what drove us to add the decodingLength outs to IsValid, but it seems that implementation also needs to be able to find a base64-encoded value within the region rather than validating the whole thing?