1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-07-30 22:43:08 +03:00

Fixed const correctness issues that have no impact on the ABI

(cherry picked from commit eae09db9e5)

Conflicts:
	library/gcm.c
This commit is contained in:
Paul Bakker
2013-06-24 19:03:14 +02:00
parent 2013950545
commit 3c2122ff9d
12 changed files with 60 additions and 69 deletions

View File

@ -254,8 +254,7 @@ void sha1_update( sha1_context *ctx, const unsigned char *input, size_t ilen )
if( left && ilen >= fill )
{
memcpy( (void *) (ctx->buffer + left),
(void *) input, fill );
memcpy( (void *) (ctx->buffer + left), input, fill );
sha1_process( ctx, ctx->buffer );
input += fill;
ilen -= fill;
@ -270,10 +269,7 @@ void sha1_update( sha1_context *ctx, const unsigned char *input, size_t ilen )
}
if( ilen > 0 )
{
memcpy( (void *) (ctx->buffer + left),
(void *) input, ilen );
}
memcpy( (void *) (ctx->buffer + left), input, ilen );
}
static const unsigned char sha1_padding[64] =
@ -303,7 +299,7 @@ void sha1_finish( sha1_context *ctx, unsigned char output[20] )
last = ctx->total[0] & 0x3F;
padn = ( last < 56 ) ? ( 56 - last ) : ( 120 - last );
sha1_update( ctx, (unsigned char *) sha1_padding, padn );
sha1_update( ctx, sha1_padding, padn );
sha1_update( ctx, msglen, 8 );
PUT_UINT32_BE( ctx->state[0], output, 0 );