-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Base64DecoderWithIgnore.calcSizeUpperBound cannot return an error #25834
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
Conversation
|
If it doesn't, this is probably because it hasn't been implemented yet. But if after skipping the ignored chars, the length is inconsistent with the required padding (for variants that require padding), I'd expect that function to return |
|
I don't think this function should return |
|
I forgot to change the doc comment, tho. I'll fix it. |
|
If the input contains only ignored characters, it returns 0. However, if the input length is not valid for padded Base64 and cannot be decoded, then returning an error is expected. This is trivial to fix: https://gist.github.com/jedisct1/8ea5328ff856a5350432d21f69b78153 So I would prefer to fix the root cause rather than introduce a different breaking change that doesn't really help applications. |
|
Or that can be two different functions, one that just takes the length (but in that case, update the function comment) and another one that takes the string. |
|
I think those should be two separate functions. |
|
|
|
Oh nice, I forgot about In that case, can you just update the function description to reflect the change? |
No description provided.