Skip to content

Commit e390473

Browse files
committed
Fix overriding of print to be compatible to stdlib again
1 parent 18b9775 commit e390473

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

Sha/sha1.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,10 @@ void Sha1Class::addUncounted(uint8_t data) {
7272
}
7373
}
7474

75-
void Sha1Class::write(uint8_t data) {
75+
size_t Sha1Class::write(uint8_t data) {
7676
++byteCount;
7777
addUncounted(data);
78+
return 1;
7879
}
7980

8081
void Sha1Class::pad() {

Sha/sha1.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class Sha1Class : public Print
2323
void initHmac(const uint8_t* secret, int secretLength);
2424
uint8_t* result(void);
2525
uint8_t* resultHmac(void);
26-
virtual void write(uint8_t);
26+
virtual size_t write(uint8_t);
2727
using Print::write;
2828
private:
2929
void pad();

0 commit comments

Comments
 (0)