diff options
author | Michael Vogt <michael.vogt@ubuntu.com> | 2011-07-15 09:42:37 +0200 |
---|---|---|
committer | Michael Vogt <michael.vogt@ubuntu.com> | 2011-07-15 09:42:37 +0200 |
commit | 35555c1826da5df9f2c06a74f2e91be843ad8142 (patch) | |
tree | 9127cb9461a2de987748600c08682f7051ba12b7 /apt-pkg/contrib/md5.cc | |
parent | cec8c646c79e40d928464b08a6f2e3ea62bb1611 (diff) | |
parent | 4b42f43bed369817398b6c8d538f08e5bf6dff76 (diff) |
merged from donkult
Diffstat (limited to 'apt-pkg/contrib/md5.cc')
-rw-r--r-- | apt-pkg/contrib/md5.cc | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/apt-pkg/contrib/md5.cc b/apt-pkg/contrib/md5.cc index 6820d3951..65e20e9bb 100644 --- a/apt-pkg/contrib/md5.cc +++ b/apt-pkg/contrib/md5.cc @@ -231,29 +231,6 @@ bool MD5Summation::Add(const unsigned char *data,unsigned long len) return true; } /*}}}*/ -// MD5Summation::AddFD - Add the contents of a FD to the hash /*{{{*/ -// --------------------------------------------------------------------- -/* */ -bool MD5Summation::AddFD(int Fd,unsigned long Size) -{ - unsigned char Buf[64*64]; - int Res = 0; - int ToEOF = (Size == 0); - while (Size != 0 || ToEOF) - { - unsigned n = sizeof(Buf); - if (!ToEOF) n = min(Size,(unsigned long)n); - Res = read(Fd,Buf,n); - if (Res < 0 || (!ToEOF && (unsigned) Res != n)) // error, or short read - return false; - if (ToEOF && Res == 0) // EOF - break; - Size -= Res; - Add(Buf,Res); - } - return true; -} - /*}}}*/ // MD5Summation::Result - Returns the value of the sum /*{{{*/ // --------------------------------------------------------------------- /* Because this must add in the last bytes of the series it prevents anyone |