Scanframe Modular Application 0.1.0
Loading...
Searching...
No Matches
sf::Md5Hash Class Reference

Class replacing obsolete SSL 3.0 library MD5 functionality. More...

#include <Md5Hash.h>

Classes

union  hash_type
 Type for storing an MD5 hash. More...

Public Member Functions

 Md5Hash ()
 Default constructor.
 Md5Hash (const hash_type &hash)
 Initializing constructor using an unsigned character pointer.
 Md5Hash (const uint8_t *data, size_t length)
 Initializing constructor using an unsigned character pointer.
 Md5Hash (const char *data, size_t length)
 Md5Hash (const std::string &str)
 Initializing constructor using a std::string.
void update (const uint8_t *data, size_t length)
 MD5 block update operation. Continues an MD5 message-digest operation, processing another message block.
void update (const char *data, size_t length)
 MD5 block update operation with unsigned char.
void initialize ()
 Initialization or reset.
Md5Hash & finalize ()
 MD5 finalization. Ends an MD5 message-digest operation writing the message digest and zeroing the context.
std::string hexDigest () const
 Gets hex representation of digest as string.
hash_type hash () const
 Returns the resulting hash structure/union.

Static Public Member Functions

static hash_type from (const std::string &hex_str)
 Get hash_type using the passed hex string.

Detailed Description

Class replacing obsolete SSL 3.0 library MD5 functionality.

Constructor & Destructor Documentation

◆ Md5Hash() [1/5]

sf::Md5Hash::Md5Hash ( )

Default constructor.

◆ Md5Hash() [2/5]

sf::Md5Hash::Md5Hash ( const hash_type & hash)
explicit

Initializing constructor using an unsigned character pointer.

◆ Md5Hash() [3/5]

sf::Md5Hash::Md5Hash ( const uint8_t * data,
size_t length )
explicit

Initializing constructor using an unsigned character pointer.

◆ Md5Hash() [4/5]

sf::Md5Hash::Md5Hash ( const char * data,
size_t length )
explicit

Initializing constructor using a character pointer.

◆ Md5Hash() [5/5]

sf::Md5Hash::Md5Hash ( const std::string & str)
explicit

Initializing constructor using a std::string.

Member Function Documentation

◆ finalize()

Md5Hash & sf::Md5Hash::finalize ( )

MD5 finalization. Ends an MD5 message-digest operation writing the message digest and zeroing the context.

◆ from()

hash_type sf::Md5Hash::from ( const std::string & hex_str)
static

Get hash_type using the passed hex string.

Parameters
hex_strHexadecimal string.
Returns
Initialized hash type.

◆ hash()

hash_type sf::Md5Hash::hash ( ) const
nodiscard

Returns the resulting hash structure/union.

◆ hexDigest()

std::string sf::Md5Hash::hexDigest ( ) const
nodiscard

Gets hex representation of digest as string.

◆ initialize()

void sf::Md5Hash::initialize ( )

Initialization or reset.

◆ update() [1/2]

void sf::Md5Hash::update ( const char * data,
size_t length )

MD5 block update operation with unsigned char.

◆ update() [2/2]

void sf::Md5Hash::update ( const uint8_t * data,
size_t length )

MD5 block update operation. Continues an MD5 message-digest operation, processing another message block.


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