The Hasher class.
More...
#include <Hasher.h>
|
| | Hasher (const std::shared_ptr< AuxFunc > &af) |
| | Hasher constructor.
|
| std::string | buf_hashing (const std::string &buf) |
| | Creates hash sum for given buffer.
|
| std::string | file_hashing (const std::filesystem::path &filepath) |
| | Creates hash sum for given file.
|
|
void | cancelAll () |
| | Stops all operations.
|
|
| std::atomic< bool > | cancel |
| | Stops all operations if true.
|
| std::function< void()> | stop_all_signal |
| | Stop signal for heir classes.
|
The Hasher class.
This class contains methods for hash sums creating (Blake-256 algorithm).
◆ Hasher()
| Hasher::Hasher |
( |
const std::shared_ptr< AuxFunc > & | af | ) |
|
Hasher constructor.
- Parameters
-
◆ buf_hashing()
| std::string Hasher::buf_hashing |
( |
const std::string & | buf | ) |
|
Creates hash sum for given buffer.
- Note
- This method can throw std::exception in case of error.
- Parameters
-
- Returns
- 32 bytes of hash sum value.
◆ file_hashing()
| std::string Hasher::file_hashing |
( |
const std::filesystem::path & | filepath | ) |
|
Creates hash sum for given file.
- Note
- This method can throw std::exception in case of error.
- Parameters
-
| filepath | absolute path to file to be hashed. |
- Returns
- 32 bytes of hash sum value.
◆ cancel
| std::atomic<bool> Hasher::cancel |
|
protected |
Stops all operations if true.
- Warning
- Do not call or set this variable yourself!
◆ stop_all_signal
| std::function<void()> Hasher::stop_all_signal |
|
protected |
Stop signal for heir classes.
- Warning
- Do not call or set this variable yourself!