diff options
author | Samuel Neves <sneves@dei.uc.pt> | 2015-05-29 14:40:07 +0300 |
---|---|---|
committer | Samuel Neves <sneves@dei.uc.pt> | 2015-05-29 14:44:26 +0300 |
commit | 105d4e49c62847ae033757e953572471bbfdb8c6 (patch) | |
tree | e35b7b0d5b919faf9b5fd0669e3934707c94ac61 | |
parent | 5f615da00088e28419e39a66c79464db00688195 (diff) |
fix flags on architectures with < 32-bit int
-rw-r--r-- | ref/blake2b-ref.c | 8 | ||||
-rw-r--r-- | ref/blake2s-ref.c | 8 | ||||
-rw-r--r-- | sse/blake2b.c | 8 | ||||
-rw-r--r-- | sse/blake2s.c | 8 |
4 files changed, 16 insertions, 16 deletions
diff --git a/ref/blake2b-ref.c b/ref/blake2b-ref.c index fe27f85..f962671 100644 --- a/ref/blake2b-ref.c +++ b/ref/blake2b-ref.c @@ -45,13 +45,13 @@ static const uint8_t blake2b_sigma[12][16] = static inline int blake2b_set_lastnode( blake2b_state *S ) { - S->f[1] = ~0ULL; + S->f[1] = -1; return 0; } static inline int blake2b_clear_lastnode( blake2b_state *S ) { - S->f[1] = 0ULL; + S->f[1] = 0; return 0; } @@ -60,7 +60,7 @@ static inline int blake2b_set_lastblock( blake2b_state *S ) { if( S->last_node ) blake2b_set_lastnode( S ); - S->f[0] = ~0ULL; + S->f[0] = -1; return 0; } @@ -68,7 +68,7 @@ static inline int blake2b_clear_lastblock( blake2b_state *S ) { if( S->last_node ) blake2b_clear_lastnode( S ); - S->f[0] = 0ULL; + S->f[0] = 0; return 0; } diff --git a/ref/blake2s-ref.c b/ref/blake2s-ref.c index e9489fe..9678e79 100644 --- a/ref/blake2s-ref.c +++ b/ref/blake2s-ref.c @@ -40,13 +40,13 @@ static const uint8_t blake2s_sigma[10][16] = static inline int blake2s_set_lastnode( blake2s_state *S ) { - S->f[1] = ~0U; + S->f[1] = -1; return 0; } static inline int blake2s_clear_lastnode( blake2s_state *S ) { - S->f[1] = 0U; + S->f[1] = 0; return 0; } @@ -55,7 +55,7 @@ static inline int blake2s_set_lastblock( blake2s_state *S ) { if( S->last_node ) blake2s_set_lastnode( S ); - S->f[0] = ~0U; + S->f[0] = -1; return 0; } @@ -63,7 +63,7 @@ static inline int blake2s_clear_lastblock( blake2s_state *S ) { if( S->last_node ) blake2s_clear_lastnode( S ); - S->f[0] = 0U; + S->f[0] = 0; return 0; } diff --git a/sse/blake2b.c b/sse/blake2b.c index 1052264..041c2d2 100644 --- a/sse/blake2b.c +++ b/sse/blake2b.c @@ -65,13 +65,13 @@ static const uint8_t blake2b_sigma[12][16] = /* Some helper functions, not necessarily useful */ static inline int blake2b_set_lastnode( blake2b_state *S ) { - S->f[1] = ~0ULL; + S->f[1] = -1; return 0; } static inline int blake2b_clear_lastnode( blake2b_state *S ) { - S->f[1] = 0ULL; + S->f[1] = 0; return 0; } @@ -79,7 +79,7 @@ static inline int blake2b_set_lastblock( blake2b_state *S ) { if( S->last_node ) blake2b_set_lastnode( S ); - S->f[0] = ~0ULL; + S->f[0] = -1; return 0; } @@ -87,7 +87,7 @@ static inline int blake2b_clear_lastblock( blake2b_state *S ) { if( S->last_node ) blake2b_clear_lastnode( S ); - S->f[0] = 0ULL; + S->f[0] = 0; return 0; } diff --git a/sse/blake2s.c b/sse/blake2s.c index 909745c..8c32bc9 100644 --- a/sse/blake2s.c +++ b/sse/blake2s.c @@ -61,13 +61,13 @@ static const uint8_t blake2s_sigma[10][16] = /* Some helper functions, not necessarily useful */ static inline int blake2s_set_lastnode( blake2s_state *S ) { - S->f[1] = ~0U; + S->f[1] = -1; return 0; } static inline int blake2s_clear_lastnode( blake2s_state *S ) { - S->f[1] = 0U; + S->f[1] = 0; return 0; } @@ -75,7 +75,7 @@ static inline int blake2s_set_lastblock( blake2s_state *S ) { if( S->last_node ) blake2s_set_lastnode( S ); - S->f[0] = ~0U; + S->f[0] = -1; return 0; } @@ -83,7 +83,7 @@ static inline int blake2s_clear_lastblock( blake2s_state *S ) { if( S->last_node ) blake2s_clear_lastnode( S ); - S->f[0] = 0U; + S->f[0] = 0; return 0; } |