1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-04-19 23:22:16 +03:00

use size_t in md5builder stream

This commit is contained in:
Andrew Melvin 2016-01-09 10:30:28 +02:00
parent e12b6ffa40
commit 2cf902cb76
2 changed files with 2 additions and 2 deletions

View File

@ -23,7 +23,7 @@ void MD5Builder::addHexString(const char * data){
free(tmp); free(tmp);
} }
bool MD5Builder::addStream(Stream & stream, const int total_len) { bool MD5Builder::addStream(Stream & stream, const size_t total_len) {
const int buf_size = 512; const int buf_size = 512;
int bytesleft = total_len; int bytesleft = total_len;
uint8_t * buf = (uint8_t*) malloc(buf_size); uint8_t * buf = (uint8_t*) malloc(buf_size);

View File

@ -37,7 +37,7 @@ class MD5Builder {
void addHexString(const char * data); void addHexString(const char * data);
void addHexString(char * data){ addHexString((const char*)data); } void addHexString(char * data){ addHexString((const char*)data); }
void addHexString(String data){ addHexString(data.c_str()); } void addHexString(String data){ addHexString(data.c_str()); }
bool addStream(Stream & stream, int len); bool addStream(Stream & stream, const size_t total_len);
void calculate(void); void calculate(void);
void getBytes(uint8_t * output); void getBytes(uint8_t * output);
void getChars(char * output); void getChars(char * output);