-
-
Notifications
You must be signed in to change notification settings - Fork 13
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
Optional Padding #4
Comments
@ukstv suggested using multibase table for naming. That would likely break backwards compatibility and will require 2.0. The question is whether it's optimal to have non-padded defaults (base64url). One argument is that multibase uses it but multibase is not really an authority (rfcs are) |
I would like to provide two arguments in favour of multibase names.
There is an alternative approach though to changing names in this library (was about to post it in the did-jwt PR, but got unicorned by GitHub). One writes say |
One can optimize for different objectives, so this is ambiguous. We can optimize for community interoperability or backward compatibility... or both (by releasing a patch version and a major version bump). Or a new library as suggested. Or we can optimize for minimal effort and do none of the above :) As a simple user, I'd be pleased with any movement. |
I agree that the issue will need to be solved at some point. The next step for me or anyone else who's willing to dive into this would be to analyze what's being done is competition base64url (etc) libraries and what's their default/non-default behavior. |
Thanks Alex, that's very helpful! |
So I guess we should make 1.2 with non-padded versions of the functions to mitigate the issue for existing users. Any ideas on the naming? The multiformats table seems nice and comprehensive, and the fact most libraries are using non-padded defaults also matters, so for some future 2.0 we should probably switch to the naming from the table. |
For 1.2, we could avoid the naming problem by following rfc4648.js's style and adding an optional |
Opts will be a problem, since our other encoders are not really using them. |
Done, added as base64urlnopad |
@paulmillr can you publish an npm release so that |
will publish the new version soon. |
1.1.2 is out folks |
RFC4648 states:
An example of a specification that prohibits padding characters is RFC8555:
Therefore, it would be nice if the encoding/decoding functions provided an option to omit padding characters.
The text was updated successfully, but these errors were encountered: