1
1
mirror of https://github.com/BLAKE2/BLAKE2 synced 2024-11-08 14:59:19 +01:00

fix flags on architectures with < 32-bit int

This commit is contained in:
Samuel Neves 2015-05-29 12:40:07 +01:00
parent 5f615da000
commit 105d4e49c6
4 changed files with 16 additions and 16 deletions

@ -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;
}

@ -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;
}

@ -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;
}

@ -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;
}