Skip to content

Commit

Permalink
Compile error fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
BerkOzdilek committed Jun 28, 2016
1 parent 18b9775 commit 0ee3a5b
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions Sha/sha1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#define SHA1_K40 0x8f1bbcdc
#define SHA1_K60 0xca62c1d6

uint8_t sha1InitState[] PROGMEM = {
const uint8_t sha1InitState[] PROGMEM = {
0x01,0x23,0x45,0x67, // H0
0x89,0xab,0xcd,0xef, // H1
0xfe,0xdc,0xba,0x98, // H2
Expand Down Expand Up @@ -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);
}
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
6 changes: 3 additions & 3 deletions Sha/sha256.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include <avr/pgmspace.h>
#include "sha256.h"

uint32_t sha256K[] PROGMEM = {
const uint32_t sha256K[] PROGMEM = {
0x428a2f98,0x71374491,0xb5c0fbcf,0xe9b5dba5,0x3956c25b,0x59f111f1,0x923f82a4,0xab1c5ed5,
0xd807aa98,0x12835b01,0x243185be,0x550c7dc3,0x72be5d74,0x80deb1fe,0x9bdc06a7,0xc19bf174,
0xe49b69c1,0xefbe4786,0x0fc19dc6,0x240ca1cc,0x2de92c6f,0x4a7484aa,0x5cb0a9dc,0x76f988da,
Expand All @@ -16,7 +16,7 @@ uint32_t sha256K[] PROGMEM = {

#define BUFFER_SIZE 64

uint8_t sha256InitState[] PROGMEM = {
const uint8_t sha256InitState[] PROGMEM = {
0x67,0xe6,0x09,0x6a, // H0
0x85,0xae,0x67,0xbb, // H1
0x72,0xf3,0x6e,0x3c, // H2
Expand Down Expand Up @@ -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);
}
Expand Down
2 changes: 1 addition & 1 deletion Sha/sha256.h
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 0ee3a5b

Please sign in to comment.