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

Base64/58/32/16 omitPadding options #186

Open
er1c opened this issue Jun 16, 2020 · 5 comments
Open

Base64/58/32/16 omitPadding options #186

er1c opened this issue Jun 16, 2020 · 5 comments

Comments

@er1c
Copy link
Contributor

er1c commented Jun 16, 2020

The current toBase* methods all pad. Guava has a omitPadding() option that would be great to add toBase/fromBase helpers for.

It also might not hurt to make an alias of toHex as toBase16 (and fromBase16 to fromHex)

Thanks!

@lhns
Copy link
Contributor

lhns commented Jun 16, 2020

The toBase32 method already provides a workaround for this. If you set Alphabet.pad to '\0' it will not apply any padding. Maybe the other toBaseX methods should support this too?

@er1c
Copy link
Contributor Author

er1c commented Jun 16, 2020

Ahh, thanks for this note, that simplifies the refactoring I was doing.

@er1c
Copy link
Contributor Author

er1c commented Jun 17, 2020

@LolHens I took a stab at these: #188 feedback welcome!

@lhns
Copy link
Contributor

lhns commented Jun 17, 2020

LGTM but I'm not a maintainer of this project. Just did the base32 impl.

@sideeffffect
Copy link
Contributor

This can be closed, no?
/cc @mpilquist

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

No branches or pull requests

3 participants