mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2025-08-05 14:04:38 +08:00
using MEMCPY() instead of memcpy()
This commit is contained in:
parent
42827cdea2
commit
05aa1f1ae4
@ -206,7 +206,7 @@ void md4_update( md4_context *ctx, unsigned char *input, int ilen )
|
|||||||
|
|
||||||
if( left && ilen >= fill )
|
if( left && ilen >= fill )
|
||||||
{
|
{
|
||||||
memcpy( (void *) (ctx->buffer + left),
|
MEMCPY( (void *) (ctx->buffer + left),
|
||||||
(void *) input, fill );
|
(void *) input, fill );
|
||||||
md4_process( ctx, ctx->buffer );
|
md4_process( ctx, ctx->buffer );
|
||||||
input += fill;
|
input += fill;
|
||||||
@ -223,7 +223,7 @@ void md4_update( md4_context *ctx, unsigned char *input, int ilen )
|
|||||||
|
|
||||||
if( ilen > 0 )
|
if( ilen > 0 )
|
||||||
{
|
{
|
||||||
memcpy( (void *) (ctx->buffer + left),
|
MEMCPY( (void *) (ctx->buffer + left),
|
||||||
(void *) input, ilen );
|
(void *) input, ilen );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -274,8 +274,6 @@ void md4( unsigned char *input, int ilen, unsigned char output[16] )
|
|||||||
md4_starts( &ctx );
|
md4_starts( &ctx );
|
||||||
md4_update( &ctx, input, ilen );
|
md4_update( &ctx, input, ilen );
|
||||||
md4_finish( &ctx, output );
|
md4_finish( &ctx, output );
|
||||||
|
|
||||||
memset( &ctx, 0, sizeof( md4_context ) );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* LWIP_INCLUDED_POLARSSL_MD4_C */
|
#endif /* LWIP_INCLUDED_POLARSSL_MD4_C */
|
||||||
|
@ -225,7 +225,7 @@ void md5_update( md5_context *ctx, unsigned char *input, int ilen )
|
|||||||
|
|
||||||
if( left && ilen >= fill )
|
if( left && ilen >= fill )
|
||||||
{
|
{
|
||||||
memcpy( (void *) (ctx->buffer + left),
|
MEMCPY( (void *) (ctx->buffer + left),
|
||||||
(void *) input, fill );
|
(void *) input, fill );
|
||||||
md5_process( ctx, ctx->buffer );
|
md5_process( ctx, ctx->buffer );
|
||||||
input += fill;
|
input += fill;
|
||||||
@ -242,7 +242,7 @@ void md5_update( md5_context *ctx, unsigned char *input, int ilen )
|
|||||||
|
|
||||||
if( ilen > 0 )
|
if( ilen > 0 )
|
||||||
{
|
{
|
||||||
memcpy( (void *) (ctx->buffer + left),
|
MEMCPY( (void *) (ctx->buffer + left),
|
||||||
(void *) input, ilen );
|
(void *) input, ilen );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -293,8 +293,6 @@ void md5( unsigned char *input, int ilen, unsigned char output[16] )
|
|||||||
md5_starts( &ctx );
|
md5_starts( &ctx );
|
||||||
md5_update( &ctx, input, ilen );
|
md5_update( &ctx, input, ilen );
|
||||||
md5_finish( &ctx, output );
|
md5_finish( &ctx, output );
|
||||||
|
|
||||||
memset( &ctx, 0, sizeof( md5_context ) );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* LWIP_INCLUDED_POLARSSL_MD5_C */
|
#endif /* LWIP_INCLUDED_POLARSSL_MD5_C */
|
||||||
|
@ -259,7 +259,7 @@ void sha1_update( sha1_context *ctx, unsigned char *input, int ilen )
|
|||||||
|
|
||||||
if( left && ilen >= fill )
|
if( left && ilen >= fill )
|
||||||
{
|
{
|
||||||
memcpy( (void *) (ctx->buffer + left),
|
MEMCPY( (void *) (ctx->buffer + left),
|
||||||
(void *) input, fill );
|
(void *) input, fill );
|
||||||
sha1_process( ctx, ctx->buffer );
|
sha1_process( ctx, ctx->buffer );
|
||||||
input += fill;
|
input += fill;
|
||||||
@ -276,7 +276,7 @@ void sha1_update( sha1_context *ctx, unsigned char *input, int ilen )
|
|||||||
|
|
||||||
if( ilen > 0 )
|
if( ilen > 0 )
|
||||||
{
|
{
|
||||||
memcpy( (void *) (ctx->buffer + left),
|
MEMCPY( (void *) (ctx->buffer + left),
|
||||||
(void *) input, ilen );
|
(void *) input, ilen );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -328,8 +328,6 @@ void sha1( unsigned char *input, int ilen, unsigned char output[20] )
|
|||||||
sha1_starts( &ctx );
|
sha1_starts( &ctx );
|
||||||
sha1_update( &ctx, input, ilen );
|
sha1_update( &ctx, input, ilen );
|
||||||
sha1_finish( &ctx, output );
|
sha1_finish( &ctx, output );
|
||||||
|
|
||||||
memset( &ctx, 0, sizeof( sha1_context ) );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* LWIP_INCLUDED_POLARSSL_SHA1_C */
|
#endif /* LWIP_INCLUDED_POLARSSL_SHA1_C */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user