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

Implementation of MD5 cryptographic hash algorithm. More...

#include <MD5.h>

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

Public Member Functions

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

Static Public Attributes

static const char * Name = "MD5"
 Identifier of the hash.
 

Detailed Description

Implementation of MD5 cryptographic hash algorithm.

See also
https://www.openssl.org/docs/manmaster/crypto/MD2.html

Definition at line 28 of file MD5.h.

Member Function Documentation

◆ hash()

std::string serialbox::MD5::hash ( const void *  data,
int  length 
)
overridevirtual

Compute 128 bit hash using MD5.

This function is only available if Serialbox has OpenSSL support.

Parameters
dataBinary data
lengthLenght of the binary data
Returns
MD5 hash hex representation as string

Implements serialbox::Hash.

Definition at line 31 of file MD5.cpp.

◆ name()

virtual const char* serialbox::MD5::name ( ) const
inlineoverridevirtualnoexcept

Get identifier of the hash as used in the HashFactory.

Returns
Name of the Hash

Implements serialbox::Hash.

Definition at line 36 of file MD5.h.


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