Closed c410-f3r closed 1 year ago
encoded_len
is now public starting with 0.20.0-alpha.1: https://docs.rs/base64/0.20.0-alpha.1/base64/fn.encoded_len.html
(0.20 is fine to use in production, despite the alpha name, as long as you're OK with some further API changes by the time 0.20.0 final is released -- feedback on 0.20 changes welcome!)
@marshallpierce Thank you for being open to adding new functionalities and for introducing the function.
The issue is that
encode_config_buf
panics if a buffer isn't large enough, which will abort the current thread preventing any type of graceful shutdown or alternative branch. Therefore, a public method should at least be provided to let users verify their buffers before issuingencode_config_buf
.