PPP: fix constness in PPP related files (GCC -Wcast-qual)

Signed-off-by: Dirk Ziegelmeier <dirk@ziegelmeier.net>
This commit is contained in:
Dirk Ziegelmeier
2015-09-08 21:33:00 +02:00
committed by Sylvain Rochet
parent ddf899ad1e
commit 79e7201854
15 changed files with 83 additions and 83 deletions

View File

@@ -394,7 +394,7 @@ void des_setkey_dec( des_context *ctx, unsigned char key[8] )
* DES-ECB block encryption/decryption
*/
void des_crypt_ecb( des_context *ctx,
unsigned char input[8],
const unsigned char input[8],
unsigned char output[8] )
{
int i;

View File

@@ -83,7 +83,7 @@ void md4_starts( md4_context *ctx )
ctx->state[3] = 0x10325476;
}
static void md4_process( md4_context *ctx, unsigned char data[64] )
static void md4_process( md4_context *ctx, const unsigned char data[64] )
{
unsigned long X[16], A, B, C, D;
@@ -189,7 +189,7 @@ static void md4_process( md4_context *ctx, unsigned char data[64] )
/*
* MD4 process buffer
*/
void md4_update( md4_context *ctx, unsigned char *input, int ilen )
void md4_update( md4_context *ctx, const unsigned char *input, int ilen )
{
int fill;
unsigned long left;
@@ -209,7 +209,7 @@ void md4_update( md4_context *ctx, unsigned char *input, int ilen )
if( left && ilen >= fill )
{
MEMCPY( (void *) (ctx->buffer + left),
(void *) input, fill );
input, fill );
md4_process( ctx, ctx->buffer );
input += fill;
ilen -= fill;
@@ -226,7 +226,7 @@ void md4_update( md4_context *ctx, unsigned char *input, int ilen )
if( ilen > 0 )
{
MEMCPY( (void *) (ctx->buffer + left),
(void *) input, ilen );
input, ilen );
}
}
@@ -257,7 +257,7 @@ void md4_finish( md4_context *ctx, unsigned char output[16] )
last = ctx->total[0] & 0x3F;
padn = ( last < 56 ) ? ( 56 - last ) : ( 120 - last );
md4_update( ctx, (unsigned char *) md4_padding, padn );
md4_update( ctx, md4_padding, padn );
md4_update( ctx, msglen, 8 );
PUT_ULONG_LE( ctx->state[0], output, 0 );

View File

@@ -82,7 +82,7 @@ void md5_starts( md5_context *ctx )
ctx->state[3] = 0x10325476;
}
static void md5_process( md5_context *ctx, unsigned char data[64] )
static void md5_process( md5_context *ctx, const unsigned char data[64] )
{
unsigned long X[16], A, B, C, D;
@@ -208,7 +208,7 @@ static void md5_process( md5_context *ctx, unsigned char data[64] )
/*
* MD5 process buffer
*/
void md5_update( md5_context *ctx, unsigned char *input, int ilen )
void md5_update( md5_context *ctx, const unsigned char *input, int ilen )
{
int fill;
unsigned long left;
@@ -228,7 +228,7 @@ void md5_update( md5_context *ctx, unsigned char *input, int ilen )
if( left && ilen >= fill )
{
MEMCPY( (void *) (ctx->buffer + left),
(void *) input, fill );
input, fill );
md5_process( ctx, ctx->buffer );
input += fill;
ilen -= fill;
@@ -245,7 +245,7 @@ void md5_update( md5_context *ctx, unsigned char *input, int ilen )
if( ilen > 0 )
{
MEMCPY( (void *) (ctx->buffer + left),
(void *) input, ilen );
input, ilen );
}
}
@@ -276,7 +276,7 @@ void md5_finish( md5_context *ctx, unsigned char output[16] )
last = ctx->total[0] & 0x3F;
padn = ( last < 56 ) ? ( 56 - last ) : ( 120 - last );
md5_update( ctx, (unsigned char *) md5_padding, padn );
md5_update( ctx, md5_padding, padn );
md5_update( ctx, msglen, 8 );
PUT_ULONG_LE( ctx->state[0], output, 0 );

View File

@@ -83,7 +83,7 @@ void sha1_starts( sha1_context *ctx )
ctx->state[4] = 0xC3D2E1F0;
}
static void sha1_process( sha1_context *ctx, unsigned char data[64] )
static void sha1_process( sha1_context *ctx, const unsigned char data[64] )
{
unsigned long temp, W[16], A, B, C, D, E;
@@ -242,7 +242,7 @@ static void sha1_process( sha1_context *ctx, unsigned char data[64] )
/*
* SHA-1 process buffer
*/
void sha1_update( sha1_context *ctx, unsigned char *input, int ilen )
void sha1_update( sha1_context *ctx, const unsigned char *input, int ilen )
{
int fill;
unsigned long left;
@@ -262,7 +262,7 @@ void sha1_update( sha1_context *ctx, unsigned char *input, int ilen )
if( left && ilen >= fill )
{
MEMCPY( (void *) (ctx->buffer + left),
(void *) input, fill );
input, fill );
sha1_process( ctx, ctx->buffer );
input += fill;
ilen -= fill;
@@ -279,7 +279,7 @@ void sha1_update( sha1_context *ctx, unsigned char *input, int ilen )
if( ilen > 0 )
{
MEMCPY( (void *) (ctx->buffer + left),
(void *) input, ilen );
input, ilen );
}
}
@@ -310,7 +310,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_ULONG_BE( ctx->state[0], output, 0 );