Serialbox  2.2.0
Data serialization library and tools for C/C++, Python and Fortran
MD5.h
Go to the documentation of this file.
1 //===-- serialbox/core/hash/MD5.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_MD5_H
16 #define SERIALBOX_CORE_HASH_MD5_H
17 
19 
20 namespace serialbox {
21 
28 class MD5 : public Hash {
29 public:
31  static const char* Name;
32 
36  virtual const char* name() const noexcept override { return Name; }
37 
46  virtual std::string hash(const void* data, int length) override;
47 };
48 
49 } // namespace serialbox
50 
51 #endif
virtual std::string hash(const void *data, int length) override
Compute 128 bit hash using MD5.
Definition: MD5.cpp:31
Namespace of the serialbox library.
Definition: Archive.h:25
static const char * Name
Identifier of the hash.
Definition: MD5.h:31
Hash algorithm interface.
Definition: Hash.h:25
Implementation of MD5 cryptographic hash algorithm.
Definition: MD5.h:28
virtual const char * name() const noexcept override
Get identifier of the hash as used in the HashFactory.
Definition: MD5.h:36