diff options
| author | Joel Klinghed <the_jk@spawned.biz> | 2021-11-17 22:34:57 +0100 |
|---|---|---|
| committer | Joel Klinghed <the_jk@spawned.biz> | 2021-11-17 22:34:57 +0100 |
| commit | 6232d13f5321b87ddf12a1aa36b4545da45f173d (patch) | |
| tree | 23f3316470a14136debd9d02f9e920ca2b06f4cc /src/hash_method.hh | |
Travel3: Simple image and video display site
Reads the images and videos from filesystem and builds a site in
memroy.
Diffstat (limited to 'src/hash_method.hh')
| -rw-r--r-- | src/hash_method.hh | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/hash_method.hh b/src/hash_method.hh new file mode 100644 index 0000000..5a61c23 --- /dev/null +++ b/src/hash_method.hh @@ -0,0 +1,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 |
