bakaid commented on issue #690: MINIFICPP-1026 - Added base64 encoder-decoder 
to StringUtils
URL: https://github.com/apache/nifi-minifi-cpp/pull/690#issuecomment-562592332
 
 
   > > ```
   > > * keep in mind that even if we used some base64 implementation from a 
third party we would still need
   > >   
   > >   * all the StringUtils functions that wrap it, except the 
encoding/decoding function
   > >   * all the tests
   > > ```
   > 
   > This is debatable but a tested third party impl if one exists can be 
trusted. This is a lot of code with the potential for bugs. In your case you've 
written a lot of code, so I don't want to demean it but the code for an 
external third party with StringUtils seems much less risky with much lower 
tests -- unless we simply can't find a third party impl. What you say about 
cURL is a valid point. Did you attempt to find a third party example? If not I 
can take a look -- there may be other string related libraries that provide 
this and some of what we do with StringUtils..
   
   @phrocker There are a myriad of base64 implementations in C, the two I meet 
the most often are 
https://web.mit.edu/freebsd/head/contrib/wpa/src/utils/base64.c and 
https://opensource.apple.com/source/QuickTimeStreamingServer/QuickTimeStreamingServer-452/CommonUtilitiesLib/base64.c
   I have yet to find one that is at the same time
    - standalone
    - can pass the test suite I have written without modification
    - well tested in itself
   
   The core part - that we would be able to substitute with a third-party 
implementation, albeit only after modifications - is composed of two look-up 
tables, a 30-line and a 65-line function.
   I think if this is reviewed properly, given our test suite, the risk is 
pretty contained.
   
   As for replacing the majority of StringUtils with some third party utility 
library: I don't know one that would fit our needs. There might well be, and in 
that I case I wouldn't be against it, but I don't want to do that integration 
work in the scope of this issue.

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to