Merge pull request #268 from psibi/blake2-update

Update blake2 with upstream
This commit is contained in:
Olivier Chéron 2019-02-24 17:47:22 +01:00
commit 101c2c05cf
5 changed files with 10 additions and 6 deletions

View File

@ -1,3 +1,7 @@
## 0.26
* Update blake2 to latest upstream version
## 0.25
* Improve digest binary conversion efficiency

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