summaryrefslogtreecommitdiff
path: root/apt-pkg/contrib/hashes.cc
diff options
context:
space:
mode:
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