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

[Proposal] Base64 urlencoding and omitting padding options #1156

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

fabianfett
Copy link
Contributor

No description provided.

@fabianfett fabianfett force-pushed the ff-pitch-add-base64-options branch from 224136d to e38461d Compare February 4, 2025 20:17
extension Data.Base64EncodingOptions {
/// Use the base64url alphabet to encode the data
@available(FoundationPreview 6.2, *)
public static var base64UrlAlphabet: Base64EncodingOptions { get }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Spelling nitpick - I think this should be capitalized like base64URLAlphabet (same for others that use URL).

@fabianfett fabianfett force-pushed the ff-pitch-add-base64-options branch from e38461d to 777ce4c Compare March 4, 2025 08:54
@fabianfett fabianfett marked this pull request as ready for review March 4, 2025 10:01
@fabianfett
Copy link
Contributor Author

@swift-ci please test

///
/// The decoding will fail if any other invalid character is found in the encoded data.
@available(FoundationPreview 6.2, *)
public static var ignoreWhitespaceCharacters: Base64EncodingOptions { get }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please fix the name scope here (encoding options vs decoding options and the extension they belong)

@itingliu itingliu added the proposal This PR is for a proposal label Mar 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
proposal This PR is for a proposal
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants