blake2 32bit build warning fix

This commit is contained in:
toddouska 2013-03-23 12:02:14 -07:00
parent d7c01be8bb
commit d33f180760
1 changed files with 4 additions and 4 deletions

View File

@ -324,7 +324,7 @@ int blake2b_update( blake2b_state *S, const byte *in, word64 inlen )
if( inlen > fill )
{
XMEMCPY( S->buf + left, in, fill ); /* Fill buffer */
XMEMCPY( S->buf + left, in, (word)fill ); /* Fill buffer */
S->buflen += fill;
blake2b_increment_counter( S, BLAKE2B_BLOCKBYTES );
blake2b_compress( S, S->buf ); /* Compress */
@ -336,7 +336,7 @@ int blake2b_update( blake2b_state *S, const byte *in, word64 inlen )
}
else /* inlen <= fill */
{
XMEMCPY( S->buf + left, in, inlen );
XMEMCPY( S->buf + left, in, (word)inlen );
S->buflen += inlen; /* Be lazy, do not compress */
in += inlen;
inlen -= inlen;
@ -357,12 +357,12 @@ int blake2b_final( blake2b_state *S, byte *out, byte outlen )
blake2b_increment_counter( S, BLAKE2B_BLOCKBYTES );
blake2b_compress( S, S->buf );
S->buflen -= BLAKE2B_BLOCKBYTES;
XMEMCPY( S->buf, S->buf + BLAKE2B_BLOCKBYTES, S->buflen );
XMEMCPY( S->buf, S->buf + BLAKE2B_BLOCKBYTES, (word)S->buflen );
}
blake2b_increment_counter( S, S->buflen );
blake2b_set_lastblock( S );
XMEMSET( S->buf + S->buflen, 0, 2 * BLAKE2B_BLOCKBYTES - S->buflen );
XMEMSET( S->buf + S->buflen, 0, (word)(2 * BLAKE2B_BLOCKBYTES - S->buflen) );
/* Padding */
blake2b_compress( S, S->buf );