Serialbox  2.2.0
Data serialization library and tools for C/C++, Python and Fortran
Hash.h
Go to the documentation of this file.
1 //===-- serialbox/core/hash/Hash.h --------------------------------------------------*- C++ -*-===//
2 //
3 // S E R I A L B O X
4 //
5 // This file is distributed under terms of BSD license.
6 // See LICENSE.txt for more information
7 //
8 //===------------------------------------------------------------------------------------------===//
9 //
13 //===------------------------------------------------------------------------------------------===//
14 
15 #ifndef SERIALBOX_CORE_HASH_HASH_H
16 #define SERIALBOX_CORE_HASH_HASH_H
17 
18 #include <string>
19 
20 namespace serialbox {
21 
25 class Hash {
26 public:
30  virtual const char* name() const noexcept = 0;
31 
38  virtual std::string hash(const void* data, int length) = 0;
39 };
40 
41 } // namespace serialbox
42 
43 #endif
virtual const char * name() const noexcept=0
Get identifier of the hash as used in the HashFactory.
Namespace of the serialbox library.
Definition: Archive.h:25
virtual std::string hash(const void *data, int length)=0
Compute hash.
Hash algorithm interface.
Definition: Hash.h:25