Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/BLAKE2/BLAKE2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/ref
diff options
context:
space:
mode:
authorSamuel Neves <sneves@dei.uc.pt>2015-05-29 14:40:07 +0300
committerSamuel Neves <sneves@dei.uc.pt>2015-05-29 14:44:26 +0300
commit105d4e49c62847ae033757e953572471bbfdb8c6 (patch)
treee35b7b0d5b919faf9b5fd0669e3934707c94ac61 /ref
parent5f615da00088e28419e39a66c79464db00688195 (diff)
fix flags on architectures with < 32-bit int
Diffstat (limited to 'ref')
-rw-r--r--ref/blake2b-ref.c8
-rw-r--r--ref/blake2s-ref.c8
2 files changed, 8 insertions, 8 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;
}