From 79de3008ebfc6b4a5dd32e9de1d19788da0b885d Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Tue, 7 Jan 2020 20:36:53 +0100 Subject: Convert users of {MD5,SHA1,SHA256,SHA512}Summation to use Hashes This makes use of the a function GetHashString() that returns the specific hash string. We also need to implement another overload of Add() for signed chars with sizes, so the existing users do not require reinterpret_cast everywhere. --- apt-pkg/deb/deblistparser.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'apt-pkg/deb/deblistparser.cc') diff --git a/apt-pkg/deb/deblistparser.cc b/apt-pkg/deb/deblistparser.cc index 88b41ad30..21d1736e4 100644 --- a/apt-pkg/deb/deblistparser.cc +++ b/apt-pkg/deb/deblistparser.cc @@ -17,8 +17,8 @@ #include #include #include +#include #include -#include #include #include #include @@ -298,10 +298,10 @@ APT::StringView debListParser::Description_md5() if (desc == "\n") return StringView(); - MD5Summation md5; + Hashes md5(Hashes::MD5SUM); md5.Add(desc.data(), desc.size()); md5.Add("\n"); - MD5Buffer = md5.Result(); + MD5Buffer = md5.GetHashString(Hashes::MD5SUM).HashValue(); return StringView(MD5Buffer); } else if (likely(value.size() == 32)) -- cgit v1.2.3