esp_rom: Allow passing any type of data pointer to md5, remove unchecked size on digest pointer

This commit is contained in:
Angus Gratton 2021-02-04 12:18:39 +11:00 committed by bot
parent 58a3e08895
commit a3856c5438

View File

@ -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
}