blob: 5a61c235f284899b5fc04623a3b43bb815b6b61d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
#ifndef HASH_METHOD_HH
#define HASH_METHOD_HH
#include <memory>
#include <string>
class HashMethod {
public:
virtual ~HashMethod() = default;
static std::unique_ptr<HashMethod> sha256();
virtual void update(void const* data, size_t count) = 0;
virtual std::string finish() = 0;
protected:
HashMethod() = default;
std::string to_string(uint8_t const* data, size_t len);
};
#endif // HASH_METHOD_HH
|