hash sums
More...
#include <cupt/hashsums.hpp>
List of all members.
Public Types |
enum | Type { MD5,
SHA1,
SHA256,
Count
} |
| hash sum type
|
Public Member Functions |
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?
|
bool | match (const HashSums &other) const |
| compares with other HashSums object
|
bool | empty () const |
| does object contain no hash sums?
|
void | fill (const string &path) |
| fills the object with the hash sums of the file content
|
Static Public Member Functions |
static string | getHashOfString (const Type &type, const string &pattern) |
| gets hash of the string
|
Public Attributes |
string | values [Count] |
| array of hash sums
|
Detailed Description
Member Function Documentation
does object contain no hash sums?
- Returns:
true
if yes, false
if no
fills the object with the hash sums of the file content
- Parameters:
-
gets hash of the string
- Parameters:
-
type | hash type |
pattern | data to hash |
- Returns:
- hash
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:
-
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: