From 6232d13f5321b87ddf12a1aa36b4545da45f173d Mon Sep 17 00:00:00 2001 From: Joel Klinghed Date: Wed, 17 Nov 2021 22:34:57 +0100 Subject: Travel3: Simple image and video display site Reads the images and videos from filesystem and builds a site in memroy. --- src/hash_method.hh | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 src/hash_method.hh (limited to 'src/hash_method.hh') 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 +#include + +class HashMethod { +public: + virtual ~HashMethod() = default; + + static std::unique_ptr 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 -- cgit v1.2.3-70-g09d2