aherbert commented on issue #46:
URL: https://github.com/apache/commons-codec/pull/46#issuecomment-616607708


   Hi,
   
   Further to Gary's note here is some info on strict decoding.
   
   The strict decoding support applies to decodings where the length of the 
input characters to decode is incorrect. Strict decoding would reject these. 
Lenient decoding would allow it. Strict decoding is a contract that states the 
encoding can be round tripped via decode-encode to the same byte array 
(ignoring padding characters).
   
   So for Base16 this is simple. If you have an even number of Hex characters 
your encoding is good and you can decode everything. If the decoding leaves a 
final trailing character you have leftover bits. Strict decoding would reject 
this. Lenient decoding would allow it by discarding the leftover bits.
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to