Permalink
Browse files

Updated write() objects to return size_t for Arduino 1.0

  • Loading branch information...
bakercp committed Apr 21, 2012
1 parent 18b9775 commit e81d54cd6797cdc9343a346b14da428a597e9955
Showing with 4 additions and 4 deletions.
  1. +1 −1 Sha/sha1.cpp
  2. +1 −1 Sha/sha1.h
  3. +1 −1 Sha/sha256.cpp
  4. +1 −1 Sha/sha256.h
View
@@ -72,7 +72,7 @@ void Sha1Class::addUncounted(uint8_t data) {
}
}
-void Sha1Class::write(uint8_t data) {
+size_t Sha1Class::write(uint8_t data) {
++byteCount;
addUncounted(data);
}
View
@@ -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();
View
@@ -87,7 +87,7 @@ void Sha256Class::addUncounted(uint8_t data) {
}
}
-void Sha256Class::write(uint8_t data) {
+size_t Sha256Class::write(uint8_t data) {
++byteCount;
addUncounted(data);
}
View
@@ -23,7 +23,7 @@ class Sha256Class : 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();

0 comments on commit e81d54c

Please sign in to comment.