hash sums
More...
#include <cupt/hashsums.hpp>
|
| enum | Type { MD5,
SHA1,
SHA256,
Count
} |
| | hash sum type
|
| |
|
|
string & | operator[] (const Type &type) |
| | shortcut to values[type]
|
| |
|
const string & | operator[] (const Type &type) const |
| | shortcut to values[type]
|
| |
| bool | verify (const string &path) const |
| | does file content match hash sums? More...
|
| |
| bool | match (const HashSums &other) const |
| | compares with other HashSums object More...
|
| |
| bool | empty () const |
| | does object contain no hash sums? More...
|
| |
| void | fill (const string &path) |
| | fills the object with the hash sums of the file content More...
|
| |
|
|
string | values [Count] |
| | array of hash sums
|
| |
| bool cupt::HashSums::empty |
( |
| ) |
const |
does object contain no hash sums?
- Returns
true if yes, false if no
| void cupt::HashSums::fill |
( |
const string & |
path | ) |
|
fills the object with the hash sums of the file content
- Parameters
-
| static string cupt::HashSums::getHashOfString |
( |
const Type & |
type, |
|
|
const string & |
pattern |
|
) |
| |
|
static |
gets hash of the string
- Parameters
-
| type | hash type |
| pattern | data to hash |
- Returns
- hash
| bool cupt::HashSums::match |
( |
const HashSums & |
other | ) |
const |
compares with other HashSums object
- Returns
- If there are no hash sums, defined in both objects, returns
false. If there are any, returns true if all matched and false otherwise
- Parameters
-
| other | object to compare with |
- Exceptions
-
| bool cupt::HashSums::verify |
( |
const string & |
path | ) |
const |
does file content match hash sums?
- Parameters
-
- Returns
true if yes, false if no
- Exceptions
-
The documentation for this class was generated from the following file: