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