6 #include "esp_rom_md5.h" 7 #define MD5_CTX_TYPE md5_context_t 10 #if defined(USE_ARDUINO) && defined(USE_ESP32) 11 #include "rom/md5_hash.h" 12 #define MD5_CTX_TYPE MD5Context 15 #if defined(USE_ARDUINO) && defined(USE_ESP8266) 17 #define MD5_CTX_TYPE md5_context_t 21 #include <MD5Builder.h> 22 #define MD5_CTX_TYPE br_md5_context 25 #if defined(USE_LIBRETINY) 27 #define MD5_CTX_TYPE LT_MD5_CTX_T 42 void add(
const uint8_t *data,
size_t len);
43 void add(
const char *data,
size_t len) { this->
add((
const uint8_t *) data, len); }
void init()
Initialize a new MD5 digest computation.
bool equals_hex(const char *expected)
Compare the digest against a provided hex-encoded digest (32 bytes).
void add(const uint8_t *data, size_t len)
Add bytes of data for the digest.
void add(const char *data, size_t len)
bool equals_bytes(const uint8_t *expected)
Compare the digest against a provided byte-encoded digest (16 bytes).
void get_bytes(uint8_t *output)
Retrieve the MD5 digest as bytes.
void get_hex(char *output)
Retrieve the MD5 digest as hex characters.
Implementation of SPI Controller mode.
void calculate()
Compute the digest, based on the provided data.