Merge branch 'feature/add_md5_algorithm_in_util' into 'master'

feat(util): Add md5 algorithm to util

See merge request sdk/ESP8266_RTOS_SDK!1024
This commit is contained in:
Dong Heng
2019-08-07 12:10:00 +08:00
8 changed files with 482 additions and 2 deletions

View File

@ -16,17 +16,21 @@
#define _ROM_MD5_HASH_H_
#include <stdint.h>
#include "sdkconfig.h"
#ifdef __cplusplus
extern "C" {
#endif
#ifdef CONFIG_ESP_MD5
#include "esp_md5.h"
#else
struct MD5Context {
uint32_t buf[4];
uint32_t bits[2];
uint8_t in[64];
};
#endif
void MD5Init(struct MD5Context *context);
void MD5Update(struct MD5Context *context, unsigned char const *buf, unsigned len);
void MD5Final(unsigned char digest[16], struct MD5Context *context);