AnCH Framework 0.1
Another C++ Hack Framework
 
Loading...
Searching...
No Matches
anch::crypto::MD5 Class Reference

MD5 hash algorithm implementation. More...

#include <md5.hpp>

+ Inheritance diagram for anch::crypto::MD5:
+ Collaboration diagram for anch::crypto::MD5:

Public Member Functions

 MD5 ()
 
 MD5 (const std::string &data)
 
 MD5 (std::istream &stream)
 
virtual ~MD5 ()
 
virtual const std::array< uint8_t, 16 > & digest () const override
 
- Public Member Functions inherited from anch::crypto::Hash< 16, 64 >
const std::array< uint8_t, O > & digest (const std::string &data)
 
const std::array< uint8_t, O > & digest (const std::array< uint8_t, N > &data)
 
const std::array< uint8_t, O > & digest (const uint8_t *data, std::size_t len)
 
const std::array< uint8_t, O > & digest (std::istream &stream)
 

Protected Member Functions

virtual void reset () override
 
virtual void addData (const uint8_t *data, std::size_t len) override
 
virtual void finalize () override
 

Friends

MD5 anch::crypto::HMAC (const std::string &, const std::string &)
 

Additional Inherited Members

- Static Public Member Functions inherited from anch::crypto::Hash< 16, 64 >
static constexpr std::size_t getOutputSize ()
 
static constexpr std::size_t getBlockSize ()
 
- Protected Attributes inherited from anch::crypto::Hash< 16, 64 >
std::array< uint8_t, O > * _digest
 

Detailed Description

MD5 hash algorithm implementation.

This algorithm is based on Qt framework algorithm.

Author
Vincent Lachenal

Constructor & Destructor Documentation

◆ MD5() [1/3]

anch::crypto::MD5::MD5 ( )

MD5 default constructor

◆ MD5() [2/3]

anch::crypto::MD5::MD5 ( const std::string & data)

MD5 constructor with string

Parameters
dataThe string data to process

◆ MD5() [3/3]

anch::crypto::MD5::MD5 ( std::istream & stream)

MD5 constructor with input stream.

Parameters
streamThe input stream to process

◆ ~MD5()

virtual anch::crypto::MD5::~MD5 ( )
virtual

MD5 destructor

Member Function Documentation

◆ addData()

virtual void anch::crypto::MD5::addData ( const uint8_t * data,
std::size_t len )
overrideprotectedvirtual

Compute hash for data with the current hash

Parameters
dataThe data to add
lenThe data length

Implements anch::crypto::Hash< 16, 64 >.

◆ digest()

virtual const std::array< uint8_t, 16 > & anch::crypto::MD5::digest ( ) const
overridevirtual

Get the MD5 hash result

Returns
the MD5 hash result

Implements anch::crypto::Hash< 16, 64 >.

◆ finalize()

virtual void anch::crypto::MD5::finalize ( )
overrideprotectedvirtual

Finalize hash

Implements anch::crypto::Hash< 16, 64 >.

◆ reset()

virtual void anch::crypto::MD5::reset ( )
overrideprotectedvirtual

Reset hash context

Implements anch::crypto::Hash< 16, 64 >.


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