ESPHome 2025.10.0-dev
Loading...
Searching...
No Matches
esphome::md5::MD5Digest Class Reference

#include <md5.h>

Inheritance diagram for esphome::md5::MD5Digest:
esphome::HashBase

Public Member Functions

 MD5Digest ()=default
 
 ~MD5Digest () override=default
 
void init () override
 Initialize a new MD5 digest computation.
 
void add (const uint8_t *data, size_t len) override
 Add bytes of data for the digest.
 
void calculate () override
 Compute the digest, based on the provided data.
 
size_t get_size () const override
 Get the size of the hash in bytes (16 for MD5)
 
void add (const char *data, size_t len)
 
- Public Member Functions inherited from esphome::HashBase
virtual ~HashBase ()=default
 
void add (const char *data, size_t len)
 
void get_bytes (uint8_t *output)
 Retrieve the hash as bytes.
 
void get_hex (char *output)
 Retrieve the hash as hex characters.
 
bool equals_bytes (const uint8_t *expected)
 Compare the hash against a provided byte-encoded hash.
 
bool equals_hex (const char *expected)
 Compare the hash against a provided hex-encoded hash.
 

Protected Attributes

MD5_CTX_TYPE ctx_ {}
 
- Protected Attributes inherited from esphome::HashBase
uint8_t digest_ [32]
 

Detailed Description

Definition at line 31 of file md5.h.

Constructor & Destructor Documentation

◆ MD5Digest()

esphome::md5::MD5Digest::MD5Digest ( )
default

◆ ~MD5Digest()

esphome::md5::MD5Digest::~MD5Digest ( )
overridedefault

Member Function Documentation

◆ add() [1/2]

void esphome::HashBase::add ( const char * data,
size_t len )
inline

Definition at line 20 of file hash_base.h.

◆ add() [2/2]

void esphome::md5::MD5Digest::add ( const uint8_t * data,
size_t len )
overridevirtual

Add bytes of data for the digest.

Implements esphome::HashBase.

Definition at line 15 of file md5.cpp.

◆ calculate()

void esphome::md5::MD5Digest::calculate ( )
overridevirtual

Compute the digest, based on the provided data.

Implements esphome::HashBase.

Definition at line 17 of file md5.cpp.

◆ get_size()

size_t esphome::md5::MD5Digest::get_size ( ) const
inlineoverridevirtual

Get the size of the hash in bytes (16 for MD5)

Implements esphome::HashBase.

Definition at line 47 of file md5.h.

◆ init()

void esphome::md5::MD5Digest::init ( )
overridevirtual

Initialize a new MD5 digest computation.

Implements esphome::HashBase.

Definition at line 10 of file md5.cpp.

Field Documentation

◆ ctx_

MD5_CTX_TYPE esphome::md5::MD5Digest::ctx_ {}
protected

Definition at line 50 of file md5.h.


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