Serialbox  2.2.0
Data serialization library and tools for C/C++, Python and Fortran
serialbox::Hash Class Referenceabstract

Hash algorithm interface. More...

#include <Hash.h>

Inheritance diagram for serialbox::Hash:
serialbox::MD5 serialbox::SHA256

Public Member Functions

virtual const char * name () const noexcept=0
 Get identifier of the hash as used in the HashFactory. More...
 
virtual std::string hash (const void *data, int length)=0
 Compute hash. More...
 

Detailed Description

Hash algorithm interface.

Definition at line 25 of file Hash.h.

Member Function Documentation

◆ hash()

virtual std::string serialbox::Hash::hash ( const void *  data,
int  length 
)
pure virtual

Compute hash.

Parameters
dataBinary data
lengthLenght of the binary data
Returns
Hex representation as string of the computed hash

Implemented in serialbox::MD5, and serialbox::SHA256.

◆ name()

virtual const char* serialbox::Hash::name ( ) const
pure virtualnoexcept

Get identifier of the hash as used in the HashFactory.

Returns
Name of the Hash

Implemented in serialbox::MD5, and serialbox::SHA256.


The documentation for this class was generated from the following file: