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

Add pad option to base64 encode/decode functions #213

Closed

Conversation

baranyildirim
Copy link
Contributor

See #211

@divarvel
Copy link
Collaborator

divarvel commented Mar 27, 2024

Following discussions in #211, i think the best would be to always use URL_SAFE_NO_PAD and not add an option.

After testing with other implementations, changing the default behaviour will break other libs. So for now the best solution is to keep things as they are and manage base64 encoding manually if one wants to deviate from defaults.

@divarvel
Copy link
Collaborator

Given that other implementations depend on the padding, we should not modify default behaviour, and since the lib allows to manually manage base64 encoding, I will close this PR.

@divarvel divarvel closed this Jan 17, 2025
@baranyildirim
Copy link
Contributor Author

accepting padded and non padded in deserialization, but only producing non padded base64 should be fine.

I don't understand how this is breaking compatibility, but I'll just maintain a separate fork. Thanks.

@divarvel
Copy link
Collaborator

since you can use Biscuit::from() with a byte slice directly, creating a helper function with the base64 settings you prefer would be way simpler than maintaining a fork imo

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