summaryrefslogtreecommitdiff
path: root/apt-pkg/contrib/hashes.cc
diff options
context:
space:
mode:
authorJulian Andres Klode <julian.klode@canonical.com>2019-02-26 12:57:46 +0100
committerJulian Andres Klode <julian.klode@canonical.com>2019-02-26 16:31:20 +0100
commitf53a120320cd09d572658d424badc5485f1b9182 (patch)
tree41d00b0c22825066c544b40924e62c31dbc81fa7 /apt-pkg/contrib/hashes.cc
parent97bd7e492bad1ef50f2659faef61b409ffe67311 (diff)
hashes: Remove deprecated functions
This keeps the members in the class, but makes them private. We want to migrate to libgcrypt eventually, since we already use libgcrypt through gpgv anyway.
Diffstat (limited to 'apt-pkg/contrib/hashes.cc')
-rw-r--r--apt-pkg/contrib/hashes.cc21
1 files changed, 0 insertions, 21 deletions
diff --git a/apt-pkg/contrib/hashes.cc b/apt-pkg/contrib/hashes.cc
index 98b92cc81..d03fb6083 100644
--- a/apt-pkg/contrib/hashes.cc
+++ b/apt-pkg/contrib/hashes.cc
@@ -312,7 +312,6 @@ bool Hashes::Add(const unsigned char * const Data, unsigned long long const Size
if (Size == 0)
return true;
bool Res = true;
-APT_IGNORE_DEPRECATED_PUSH
if ((d->CalcHashes & MD5SUM) == MD5SUM)
Res &= MD5.Add(Data, Size);
if ((d->CalcHashes & SHA1SUM) == SHA1SUM)
@@ -321,15 +320,9 @@ APT_IGNORE_DEPRECATED_PUSH
Res &= SHA256.Add(Data, Size);
if ((d->CalcHashes & SHA512SUM) == SHA512SUM)
Res &= SHA512.Add(Data, Size);
-APT_IGNORE_DEPRECATED_POP
d->FileSize += Size;
return Res;
}
-bool Hashes::Add(const unsigned char * const Data, unsigned long long const Size, unsigned int const Hashes)
-{
- d->CalcHashes = Hashes;
- return Add(Data, Size);
-}
bool Hashes::AddFD(int const Fd,unsigned long long Size)
{
unsigned char Buf[64*64];
@@ -349,11 +342,6 @@ bool Hashes::AddFD(int const Fd,unsigned long long Size)
}
return true;
}
-bool Hashes::AddFD(int const Fd,unsigned long long Size, unsigned int const Hashes)
-{
- d->CalcHashes = Hashes;
- return AddFD(Fd, Size);
-}
bool Hashes::AddFD(FileFd &Fd,unsigned long long Size)
{
unsigned char Buf[64*64];
@@ -378,16 +366,10 @@ bool Hashes::AddFD(FileFd &Fd,unsigned long long Size)
}
return true;
}
-bool Hashes::AddFD(FileFd &Fd,unsigned long long Size, unsigned int const Hashes)
-{
- d->CalcHashes = Hashes;
- return AddFD(Fd, Size);
-}
/*}}}*/
HashStringList Hashes::GetHashStringList()
{
HashStringList hashes;
-APT_IGNORE_DEPRECATED_PUSH
if ((d->CalcHashes & MD5SUM) == MD5SUM)
hashes.push_back(HashString("MD5Sum", MD5.Result().Value()));
if ((d->CalcHashes & SHA1SUM) == SHA1SUM)
@@ -396,13 +378,10 @@ APT_IGNORE_DEPRECATED_PUSH
hashes.push_back(HashString("SHA256", SHA256.Result().Value()));
if ((d->CalcHashes & SHA512SUM) == SHA512SUM)
hashes.push_back(HashString("SHA512", SHA512.Result().Value()));
-APT_IGNORE_DEPRECATED_POP
hashes.FileSize(d->FileSize);
return hashes;
}
-APT_IGNORE_DEPRECATED_PUSH
Hashes::Hashes() : d(new PrivateHashes(~0)) { }
Hashes::Hashes(unsigned int const Hashes) : d(new PrivateHashes(Hashes)) {}
Hashes::Hashes(HashStringList const &Hashes) : d(new PrivateHashes(Hashes)) {}
Hashes::~Hashes() { delete d; }
-APT_IGNORE_DEPRECATED_POP