ipfs-chromium
algorithm.h
1 #pragma once
2 
3 #include <string>
4 
5 namespace multibase {
8 class algorithm {
9  public:
11  class block_tag {};
12 
14  class stream_tag {};
15 
16  virtual ~algorithm() = default;
17 
19  virtual std::size_t block_size() { return 0; }
20 
22  virtual std::size_t output_size() { return 0; }
23 
25  virtual std::string process(std::string_view input) = 0;
26 };
27 
28 } // namespace multibase
Definition: algorithm.h:11
Definition: algorithm.h:14
Definition: algorithm.h:8
virtual std::string process(std::string_view input)=0
virtual std::size_t output_size()
Definition: algorithm.h:22
virtual std::size_t block_size()
Definition: algorithm.h:19