android-ktx icon indicating copy to clipboard operation
android-ktx copied to clipboard

Add base 64 encoding/decoding extensions.

Open JakeWharton opened this issue 7 years ago • 6 comments

I'm really not sure what to do about the parameter order. flags seem like the most useful and they're present on every overload so I put them first, but it's definitely weird to have offset/length be not first. Thoughts?

Closes #406.

JakeWharton avatar Mar 27 '18 04:03 JakeWharton

So there's good news and bad news.

:thumbsup: The good news is that everyone that needs to sign a CLA (the pull request submitter and all commit authors) have done so. Everything is all good there.

:confused: The bad news is that it appears that one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that here in the pull request.

Note to project maintainer: This is a terminal state, meaning the cla/google commit status will not change from this state. It's up to you to confirm consent of the commit author(s) and merge this pull request when appropriate.

googlebot avatar Mar 27 '18 04:03 googlebot

I have signed the @google CLA(check previous PRs) and I am in the @google organization: https://github.com/jaredsburrows.

jaredsburrows avatar Mar 28 '18 04:03 jaredsburrows

Ideally it would nice to keep parameters in order with the method but flags does seem to be more favorable as the first option.

jaredsburrows avatar Mar 28 '18 04:03 jaredsburrows

In most of the cases we need to encode/decode full ByteArray to/from Base64. So, the length and offset seems perfectly fine after flags in order. I have one question in its implementation that, Can't we use Base64.encodeToString function? Which is already available in android API instead of encoding a ByteArray to byte[] and then toString with ASCII.

Sathawale27 avatar Mar 28 '18 18:03 Sathawale27

Yep!

JakeWharton avatar Mar 28 '18 19:03 JakeWharton

@romainguy @JakeWharton Review :)

jaredsburrows avatar May 25 '18 07:05 jaredsburrows