10 #if defined(USE_ARDUINO) && !defined(USE_RP2040) 19 #endif // USE_ARDUINO && !USE_RP2040 24 esp_rom_md5_init(&this->
ctx_);
35 br_md5_init(&this->
ctx_);
38 void MD5Digest::add(
const uint8_t *data,
size_t len) { br_md5_update(&this->
ctx_, data, len); }
46 for (
size_t i = 0; i < 16; i++) {
47 sprintf(output + i * 2,
"%02x", this->
digest_[i]);
52 for (
size_t i = 0; i < 16; i++) {
53 if (expected[i] != this->
digest_[i]) {
void init()
Initialize a new MD5 digest computation.
size_t parse_hex(const char *str, size_t length, uint8_t *data, size_t count)
Parse bytes from a hex-encoded string into a byte array.
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.
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.