From 1921eaad645c9a9f62c1ed79b7ae87c417aa8a3c Mon Sep 17 00:00:00 2001 From: Ben Laurie Date: Sat, 3 Jun 2000 14:13:58 +0000 Subject: EVP constification. --- crypto/rc2/rc2.h | 18 ++++++++++-------- crypto/rc2/rc2_cbc.c | 2 +- crypto/rc2/rc2_ecb.c | 4 ++-- crypto/rc2/rc2_skey.c | 2 +- crypto/rc2/rc2cfb64.c | 5 +++-- crypto/rc2/rc2ofb64.c | 5 +++-- 6 files changed, 20 insertions(+), 16 deletions(-) (limited to 'crypto/rc2') diff --git a/crypto/rc2/rc2.h b/crypto/rc2/rc2.h index 099bc31b66..076c0a067c 100644 --- a/crypto/rc2/rc2.h +++ b/crypto/rc2/rc2.h @@ -80,17 +80,19 @@ typedef struct rc2_key_st } RC2_KEY; -void RC2_set_key(RC2_KEY *key, int len, unsigned char *data,int bits); -void RC2_ecb_encrypt(unsigned char *in,unsigned char *out,RC2_KEY *key, - int enc); +void RC2_set_key(RC2_KEY *key, int len, const unsigned char *data,int bits); +void RC2_ecb_encrypt(const unsigned char *in,unsigned char *out,RC2_KEY *key, + int enc); void RC2_encrypt(unsigned long *data,RC2_KEY *key); void RC2_decrypt(unsigned long *data,RC2_KEY *key); -void RC2_cbc_encrypt(unsigned char *in, unsigned char *out, long length, +void RC2_cbc_encrypt(const unsigned char *in, unsigned char *out, long length, RC2_KEY *ks, unsigned char *iv, int enc); -void RC2_cfb64_encrypt(unsigned char *in, unsigned char *out, long length, - RC2_KEY *schedule, unsigned char *ivec, int *num, int enc); -void RC2_ofb64_encrypt(unsigned char *in, unsigned char *out, long length, - RC2_KEY *schedule, unsigned char *ivec, int *num); +void RC2_cfb64_encrypt(const unsigned char *in, unsigned char *out, + long length, RC2_KEY *schedule, unsigned char *ivec, + int *num, int enc); +void RC2_ofb64_encrypt(const unsigned char *in, unsigned char *out, + long length, RC2_KEY *schedule, unsigned char *ivec, + int *num); #ifdef __cplusplus } diff --git a/crypto/rc2/rc2_cbc.c b/crypto/rc2/rc2_cbc.c index 1202184e85..74f48d3d87 100644 --- a/crypto/rc2/rc2_cbc.c +++ b/crypto/rc2/rc2_cbc.c @@ -59,7 +59,7 @@ #include #include "rc2_locl.h" -void RC2_cbc_encrypt(unsigned char *in, unsigned char *out, long length, +void RC2_cbc_encrypt(const unsigned char *in, unsigned char *out, long length, RC2_KEY *ks, unsigned char *iv, int encrypt) { register unsigned long tin0,tin1; diff --git a/crypto/rc2/rc2_ecb.c b/crypto/rc2/rc2_ecb.c index 7d77b9186c..d3e8c2718a 100644 --- a/crypto/rc2/rc2_ecb.c +++ b/crypto/rc2/rc2_ecb.c @@ -70,8 +70,8 @@ const char *RC2_version="RC2" OPENSSL_VERSION_PTEXT; * Date: 11 Feb 1996 06:45:03 GMT */ -void RC2_ecb_encrypt(unsigned char *in, unsigned char *out, RC2_KEY *ks, - int encrypt) +void RC2_ecb_encrypt(const unsigned char *in, unsigned char *out, RC2_KEY *ks, + int encrypt) { unsigned long l,d[2]; diff --git a/crypto/rc2/rc2_skey.c b/crypto/rc2/rc2_skey.c index 7143c4e591..cab3080c73 100644 --- a/crypto/rc2/rc2_skey.c +++ b/crypto/rc2/rc2_skey.c @@ -90,7 +90,7 @@ static unsigned char key_table[256]={ * BSAFE uses the 'retarded' version. What I previously shipped is * the same as specifying 1024 for the 'bits' parameter. Bsafe uses * a version where the bits parameter is the same as len*8 */ -void RC2_set_key(RC2_KEY *key, int len, unsigned char *data, int bits) +void RC2_set_key(RC2_KEY *key, int len, const unsigned char *data, int bits) { int i,j; unsigned char *k; diff --git a/crypto/rc2/rc2cfb64.c b/crypto/rc2/rc2cfb64.c index 5e3fa07d90..b3a0158a6e 100644 --- a/crypto/rc2/rc2cfb64.c +++ b/crypto/rc2/rc2cfb64.c @@ -64,8 +64,9 @@ * 64bit block we have used is contained in *num; */ -void RC2_cfb64_encrypt(unsigned char *in, unsigned char *out, long length, - RC2_KEY *schedule, unsigned char *ivec, int *num, int encrypt) +void RC2_cfb64_encrypt(const unsigned char *in, unsigned char *out, + long length, RC2_KEY *schedule, unsigned char *ivec, + int *num, int encrypt) { register unsigned long v0,v1,t; register int n= *num; diff --git a/crypto/rc2/rc2ofb64.c b/crypto/rc2/rc2ofb64.c index 42cdd40cdd..9e297867ed 100644 --- a/crypto/rc2/rc2ofb64.c +++ b/crypto/rc2/rc2ofb64.c @@ -63,8 +63,9 @@ * used. The extra state information to record how much of the * 64bit block we have used is contained in *num; */ -void RC2_ofb64_encrypt(unsigned char *in, unsigned char *out, long length, - RC2_KEY *schedule, unsigned char *ivec, int *num) +void RC2_ofb64_encrypt(const unsigned char *in, unsigned char *out, + long length, RC2_KEY *schedule, unsigned char *ivec, + int *num) { register unsigned long v0,v1,t; register int n= *num; -- cgit v1.2.3