apt  2.2.4
About: Apt (Advanced Package Tool) is a management system for software packages (Debian/Ubuntu). Release series 2.2.
  Fossies Dox: apt-2.2.4.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

HashString Class Reference

#include <hashes.h>

Collaboration diagram for HashString:

Public Member Functions

 HashString (std::string Type, std::string Hash)
 HashString (std::string StringedHashString)
 HashString ()
std::string HashType () const
std::string HashValue () const
bool VerifyFile (std::string filename) const
bool FromFile (std::string filename)
std::string toStr () const
bool empty () const
bool usable () const
bool operator== (HashString const &other) const
bool operator!= (HashString const &other) const

Static Public Member Functions

static APT_PURE const char ** SupportedHashes ()

Protected Member Functions

std::string GetHashForFile (std::string filename) const

Protected Attributes

std::string Type
std::string Hash

Static Protected Attributes

static const char * _SupportedHashes [10]

Detailed Description

Definition at line 27 of file hashes.h.

Constructor & Destructor Documentation

◆ HashString() [1/3]

HashString ( std::string  Type,
std::string  Hash 

Definition at line 53 of file hashes.cc.

◆ HashString() [2/3]

HashString ( std::string  StringedHashString)

Definition at line 57 of file hashes.cc.

References _config, Configuration::FindB(), Hash, and Type.

◆ HashString() [3/3]

Definition at line 49 of file hashes.cc.

Member Function Documentation

◆ empty()

APT_PURE bool empty ( ) const

Definition at line 140 of file hashes.cc.

References Hash, and Type.

Referenced by EditSources().

◆ FromFile()

bool FromFile ( std::string  filename)

Definition at line 89 of file hashes.cc.

References _SupportedHashes, GetHashForFile(), Hash, and Type.

Referenced by EditSources().

◆ GetHashForFile()

std::string GetHashForFile ( std::string  filename) const

◆ HashType()

◆ HashValue()

◆ operator!=()

APT_PURE bool operator!= ( HashString const &  other) const

Definition at line 172 of file hashes.cc.

◆ operator==()

APT_PURE bool operator== ( HashString const &  other) const

Definition at line 168 of file hashes.cc.

◆ SupportedHashes()

◆ toStr()

std::string toStr ( ) const

Definition at line 163 of file hashes.cc.

References Hash, and Type.

Referenced by pkgAcqDiffIndex::ParseDiffIndex(), and pkgAcqIndexDiffs::QueueNextDiff().

◆ usable()

APT_PURE bool usable ( ) const

Definition at line 153 of file hashes.cc.

References IsConfigured(), and Type.

Referenced by formatHashsum(), and debReleaseIndex::Load().

◆ VerifyFile()

bool VerifyFile ( std::string  filename) const

Definition at line 79 of file hashes.cc.

References _config, and Configuration::FindB().

Referenced by EditSources().

Member Data Documentation

◆ _SupportedHashes

const char * _SupportedHashes
Initial value:
"SHA512", "SHA256", "SHA1", "MD5Sum", "Checksum-FileSize", NULL

Definition at line 32 of file hashes.h.

Referenced by FromFile(), and SupportedHashes().

◆ Hash

std::string Hash

Definition at line 31 of file hashes.h.

Referenced by empty(), FromFile(), GetHashForFile(), HashString(), and toStr().

◆ Type

std::string Type

Definition at line 30 of file hashes.h.

Referenced by empty(), FromFile(), HashString(), toStr(), and usable().

The documentation for this class was generated from the following files: