From a3856c5438e4268da261f379841392a023a34f95 Mon Sep 17 00:00:00 2001 From: Angus Gratton Date: Thu, 4 Feb 2021 12:18:39 +1100 Subject: [PATCH] esp_rom: Allow passing any type of data pointer to md5, remove unchecked size on digest pointer --- components/esp_rom/include/esp_rom_md5.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/components/esp_rom/include/esp_rom_md5.h b/components/esp_rom/include/esp_rom_md5.h index 7adc430bcb..0deaca4714 100644 --- a/components/esp_rom/include/esp_rom_md5.h +++ b/components/esp_rom/include/esp_rom_md5.h @@ -48,9 +48,9 @@ void esp_rom_md5_init(md5_context_t *context); * * @param context MD5 context which has been initialized by `MD5Init` * @param buf Input buffer - * @param len Buffer length + * @param len Buffer length in bytes */ -void esp_rom_md5_update(md5_context_t *context, const uint8_t *buf, uint32_t len); +void esp_rom_md5_update(md5_context_t *context, const void *buf, uint32_t len); /** * @brief Extract the MD5 result, and erase the context @@ -58,7 +58,7 @@ void esp_rom_md5_update(md5_context_t *context, const uint8_t *buf, uint32_t len * @param digest Where to store the 128-bit digest value * @param context MD5 context */ -void esp_rom_md5_final(uint8_t digest[ESP_ROM_MD5_DIGEST_LEN], md5_context_t *context); +void esp_rom_md5_final(uint8_t *digest, md5_context_t *context); #ifdef __cplusplus }