> On Oct. 12, 2015, 7:18 p.m., Jiang Yan Xu wrote: > > 3rdparty/libprocess/include/process/digest.hpp, line 61 > > <https://reviews.apache.org/r/38747/diff/13/?file=1088004#file1088004line61> > > > > Consider using `boost::shared_array<char> data` (see io.cpp).
Since c++11 standard way is to use shared_ptr with deleter, shared_ptr is used. I have changed the deleter to use the std default deleter. I am not passing smart pointer to the called function as its not required. > On Oct. 12, 2015, 7:18 p.m., Jiang Yan Xu wrote: > > 3rdparty/libprocess/include/process/digest.hpp, lines 73-75 > > <https://reviews.apache.org/r/38747/diff/13/?file=1088004#file1088004line73> > > > > What does this mean? EOF? Add a comment? > > > > Also, we don't need to special case this right? It will terminate at > > the next iteration right? You are right. The early return is just an optimization. > On Oct. 12, 2015, 7:18 p.m., Jiang Yan Xu wrote: > > 3rdparty/libprocess/include/process/digest.hpp, line 299 > > <https://reviews.apache.org/r/38747/diff/13/?file=1088004#file1088004line299> > > > > Would it be safer to just have the caller select from the `Digest` enum? This API was chosen to enable use cases like Docker which gets the SHA method as a string. This reduces the logic at client/caller site. - Jojy ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/38747/#review101451 ----------------------------------------------------------- On Oct. 12, 2015, 9:14 p.m., Jojy Varghese wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/38747/ > ----------------------------------------------------------- > > (Updated Oct. 12, 2015, 9:14 p.m.) > > > Review request for mesos, Ben Mahler, Gilbert Song, and Timothy Chen. > > > Repository: mesos > > > Description > ------- > > Added SHA256, SHA512 implementation. > > > Diffs > ----- > > 3rdparty/libprocess/Makefile.am eb7393904988afc0bc5e9f7dadd545e0d6c04e5f > 3rdparty/libprocess/include/Makefile.am > fcc62e99b92b9d2e7ab344e561a06dd6de1fef7e > 3rdparty/libprocess/include/process/digest.hpp PRE-CREATION > 3rdparty/libprocess/src/tests/CMakeLists.txt > a14b5b8fe22d3e75bef3c716ae7865ddaf132927 > 3rdparty/libprocess/src/tests/digest_tests.cpp PRE-CREATION > > Diff: https://reviews.apache.org/r/38747/diff/ > > > Testing > ------- > > make check. > > > Thanks, > > Jojy Varghese > >
