Skip to content

Commit

Permalink
Fix overriding of print to be compatible to stdlib again
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorianLoch committed Feb 11, 2017
1 parent 18b9775 commit e390473
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion Sha/sha1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,10 @@ void Sha1Class::addUncounted(uint8_t data) {
}
}

void Sha1Class::write(uint8_t data) {
size_t Sha1Class::write(uint8_t data) {
++byteCount;
addUncounted(data);
return 1;
}

void Sha1Class::pad() {
Expand Down
2 changes: 1 addition & 1 deletion Sha/sha1.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class Sha1Class : public Print
void initHmac(const uint8_t* secret, int secretLength);
uint8_t* result(void);
uint8_t* resultHmac(void);
virtual void write(uint8_t);
virtual size_t write(uint8_t);
using Print::write;
private:
void pad();
Expand Down

0 comments on commit e390473

Please sign in to comment.