Update reference blake2 implementation with upstream

This commit is contained in:
Sibi Prabakaran 2019-02-21 17:16:00 +05:30
parent 69ef95b0de
commit af9f9548d6
No known key found for this signature in database
GPG Key ID: D19E3E0EBB557613
4 changed files with 6 additions and 6 deletions

View File

@ -72,8 +72,8 @@ static BLAKE2_INLINE uint16_t load16( const void *src )
return w;
#else
const uint8_t *p = ( const uint8_t * )src;
return (( uint16_t )( p[0] ) << 0) |
(( uint16_t )( p[1] ) << 8) ;
return ( uint16_t )((( uint32_t )( p[0] ) << 0) |
(( uint32_t )( p[1] ) << 8));
#endif
}

View File

@ -294,7 +294,7 @@ int blake2s( void *out, size_t outlen, const void *in, size_t inlen, const void
#if defined(SUPERCOP)
int crypto_hash( unsigned char *out, unsigned char *in, unsigned long long inlen )
{
return blake2s( out, BLAKE2S_OUTBYTES in, inlen, NULL, 0 );
return blake2s( out, BLAKE2S_OUTBYTES, in, inlen, NULL, 0 );
}
#endif

View File

@ -72,8 +72,8 @@ static BLAKE2_INLINE uint16_t load16( const void *src )
return w;
#else
const uint8_t *p = ( const uint8_t * )src;
return (( uint16_t )( p[0] ) << 0) |
(( uint16_t )( p[1] ) << 8) ;
return ( uint16_t )((( uint32_t )( p[0] ) << 0) |
(( uint32_t )( p[1] ) << 8));
#endif
}

View File

@ -1 +1 @@
cbits/blake2,7728c30896d3fa0c3b4df52c2bd5a1e36f8f1287,https://github.com/blake2/blake2
cbits/blake2,320c325437539ae91091ce62efec1913cd8093c2,https://github.com/blake2/blake2