diff options
Diffstat (limited to 'ftparchive')
-rw-r--r-- | ftparchive/cachedb.cc | 3 | ||||
-rw-r--r-- | ftparchive/multicompress.cc | 9 | ||||
-rw-r--r-- | ftparchive/writer.cc | 7 |
3 files changed, 6 insertions, 13 deletions
diff --git a/ftparchive/cachedb.cc b/ftparchive/cachedb.cc index 1890c28d0..dedb01eaa 100644 --- a/ftparchive/cachedb.cc +++ b/ftparchive/cachedb.cc @@ -17,9 +17,6 @@ #include <apt-pkg/fileutl.h> #include <apt-pkg/gpgv.h> #include <apt-pkg/hashes.h> -#include <apt-pkg/md5.h> -#include <apt-pkg/sha1.h> -#include <apt-pkg/sha2.h> #include <apt-pkg/strutl.h> #include <ctype.h> diff --git a/ftparchive/multicompress.cc b/ftparchive/multicompress.cc index f5fe14164..cdaa7a60a 100644 --- a/ftparchive/multicompress.cc +++ b/ftparchive/multicompress.cc @@ -18,8 +18,7 @@ #include <apt-pkg/aptconfiguration.h> #include <apt-pkg/error.h> #include <apt-pkg/fileutl.h> -#include <apt-pkg/hashsum_template.h> -#include <apt-pkg/md5.h> +#include <apt-pkg/hashes.h> #include <apt-pkg/strutl.h> #include <ctype.h> @@ -267,7 +266,7 @@ bool MultiCompress::Child(int const &FD) SetNonBlock(FD,false); unsigned char Buffer[32*1024]; unsigned long long FileSize = 0; - MD5Summation MD5; + Hashes MD5(Hashes::MD5SUM); while (1) { WaitFd(FD,false); @@ -315,7 +314,7 @@ bool MultiCompress::Child(int const &FD) } // Compute the hash - MD5Summation OldMD5; + Hashes OldMD5(Hashes::MD5SUM); unsigned long long NewFileSize = 0; while (1) { @@ -330,7 +329,7 @@ bool MultiCompress::Child(int const &FD) CompFd.Close(); // Check the hash - if (OldMD5.Result() == MD5.Result() && + if (OldMD5.GetHashString(Hashes::MD5SUM) == MD5.GetHashString(Hashes::MD5SUM) && FileSize == NewFileSize) { for (Files *I = Outputs; I != 0; I = I->Next) diff --git a/ftparchive/writer.cc b/ftparchive/writer.cc index 078638c41..5dcb98c9c 100644 --- a/ftparchive/writer.cc +++ b/ftparchive/writer.cc @@ -19,10 +19,7 @@ #include <apt-pkg/fileutl.h> #include <apt-pkg/gpgv.h> #include <apt-pkg/hashes.h> -#include <apt-pkg/md5.h> #include <apt-pkg/pkgcache.h> -#include <apt-pkg/sha1.h> -#include <apt-pkg/sha2.h> #include <apt-pkg/strutl.h> #include <apt-pkg/tagfile.h> @@ -493,9 +490,9 @@ bool PackagesWriter::DoPackage(string FileName) string DescriptionMd5; if (LongDescription == false) { - MD5Summation descmd5; + Hashes descmd5(Hashes::MD5SUM); descmd5.Add(desc.c_str()); - DescriptionMd5 = descmd5.Result().Value(); + DescriptionMd5 = descmd5.GetHashString(Hashes::MD5SUM).HashValue(); Changes.push_back(pkgTagSection::Tag::Rewrite("Description-md5", DescriptionMd5)); if (TransWriter != NULL) TransWriter->DoPackage(Package, desc, DescriptionMd5); |