apt: Hashes Class Reference

apt 3.3.3 commandline package manager

Public Types | Public Member Functions | Static Public Attributes | List of all members
Hashes Class Reference

## Public Types
enum | SupportedHashes { MD5SUM = (1 << 0) , SHA1SUM = (1 << 1) , SHA256SUM = (1 << 2) , SHA512SUM = (1 << 3) }

## Public Member Functions
bool | Add (const unsigned char *const Data, unsigned long long const Size) APT_NONNULL(2)
bool | Add (const char *const Data) APT_NONNULL(2)
bool | Add (const char *const Data, unsigned long long const Size) APT_NONNULL(2)
bool | Add (const unsigned char *const Beg, const unsigned char *const End) APT_NONNULL(2
bool | AddFD (int const Fd, unsigned long long Size=0)
bool | AddFD (FileFd &Fd, unsigned long long Size=0)
HashStringList | GetHashStringList ()
HashString | GetHashString (SupportedHashes hash)
| Hashes ()
| Hashes (unsigned int const Hashes)
| Hashes (HashStringList const &Hashes)

## Static Public Attributes
static const int | UntilEOF = 0

## Constructor & Destructor Documentation

## ◆ Hashes() [1/3]

Hashes | ( |  | ) |

create a Hashes object to calculate all supported hashes

If ALL is too much, you can limit which Hashes are calculated with the following other constructors which mention explicitly which hashes to generate.

Referenced by Hashes(), and Hashes().

## ◆ Hashes() [2/3]

Hashes | ( | unsigned int const | Hashes | ) |
| explicit

Parameters

  Hashes | bitflag composed of SupportedHashes

References Hashes().

## ◆ Hashes() [3/3]

Hashes | ( | HashStringList const & | Hashes | ) |
| explicit

Parameters

  Hashes | is a list of hashes

References Hashes().

## Member Function Documentation

## ◆ GetHashString()

HashString GetHashString | ( | SupportedHashes | hash | ) |

Get a specific hash. It is an error to use a hash that was not hashes

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

- apt-pkg/contrib/hashes.h
- apt-pkg/contrib/hashes.cc