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/idea/i_cbc.c | 4 ++-- crypto/idea/i_cfb64.c | 6 +++--- crypto/idea/i_ecb.c | 2 +- crypto/idea/i_ofb64.c | 5 +++-- crypto/idea/i_skey.c | 2 +- crypto/idea/idea.h | 10 +++++----- 6 files changed, 15 insertions(+), 14 deletions(-) (limited to 'crypto/idea') diff --git a/crypto/idea/i_cbc.c b/crypto/idea/i_cbc.c index 891a46532b..ecb9cb8b83 100644 --- a/crypto/idea/i_cbc.c +++ b/crypto/idea/i_cbc.c @@ -47,7 +47,7 @@ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * The licence and distribution terms for any publically available version or @@ -59,7 +59,7 @@ #include #include "idea_lcl.h" -void idea_cbc_encrypt(unsigned char *in, unsigned char *out, long length, +void idea_cbc_encrypt(const unsigned char *in, unsigned char *out, long length, IDEA_KEY_SCHEDULE *ks, unsigned char *iv, int encrypt) { register unsigned long tin0,tin1; diff --git a/crypto/idea/i_cfb64.c b/crypto/idea/i_cfb64.c index dacf3f1be3..66d49d520e 100644 --- a/crypto/idea/i_cfb64.c +++ b/crypto/idea/i_cfb64.c @@ -64,9 +64,9 @@ * 64bit block we have used is contained in *num; */ -void idea_cfb64_encrypt(unsigned char *in, unsigned char *out, long length, - IDEA_KEY_SCHEDULE *schedule, unsigned char *ivec, int *num, - int encrypt) +void idea_cfb64_encrypt(const unsigned char *in, unsigned char *out, + long length, IDEA_KEY_SCHEDULE *schedule, + unsigned char *ivec, int *num, int encrypt) { register unsigned long v0,v1,t; register int n= *num; diff --git a/crypto/idea/i_ecb.c b/crypto/idea/i_ecb.c index 93937d2063..fb613db595 100644 --- a/crypto/idea/i_ecb.c +++ b/crypto/idea/i_ecb.c @@ -70,7 +70,7 @@ const char *idea_options(void) return("idea(short)"); } -void idea_ecb_encrypt(unsigned char *in, unsigned char *out, +void idea_ecb_encrypt(const unsigned char *in, unsigned char *out, IDEA_KEY_SCHEDULE *ks) { unsigned long l0,l1,d[2]; diff --git a/crypto/idea/i_ofb64.c b/crypto/idea/i_ofb64.c index afcbed2d14..e749e88e34 100644 --- a/crypto/idea/i_ofb64.c +++ b/crypto/idea/i_ofb64.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 idea_ofb64_encrypt(unsigned char *in, unsigned char *out, long length, - IDEA_KEY_SCHEDULE *schedule, unsigned char *ivec, int *num) +void idea_ofb64_encrypt(const unsigned char *in, unsigned char *out, + long length, IDEA_KEY_SCHEDULE *schedule, + unsigned char *ivec, int *num) { register unsigned long v0,v1,t; register int n= *num; diff --git a/crypto/idea/i_skey.c b/crypto/idea/i_skey.c index bbbda6b5c8..1c95bc9c7b 100644 --- a/crypto/idea/i_skey.c +++ b/crypto/idea/i_skey.c @@ -60,7 +60,7 @@ #include "idea_lcl.h" static IDEA_INT inverse(unsigned int xin); -void idea_set_encrypt_key(unsigned char *key, IDEA_KEY_SCHEDULE *ks) +void idea_set_encrypt_key(const unsigned char *key, IDEA_KEY_SCHEDULE *ks) { int i; register IDEA_INT *kt,*kf,r0,r1,r2; diff --git a/crypto/idea/idea.h b/crypto/idea/idea.h index f5efeae366..f14adf8398 100644 --- a/crypto/idea/idea.h +++ b/crypto/idea/idea.h @@ -80,16 +80,16 @@ typedef struct idea_key_st } IDEA_KEY_SCHEDULE; const char *idea_options(void); -void idea_ecb_encrypt(unsigned char *in, unsigned char *out, +void idea_ecb_encrypt(const unsigned char *in, unsigned char *out, IDEA_KEY_SCHEDULE *ks); -void idea_set_encrypt_key(unsigned char *key, IDEA_KEY_SCHEDULE *ks); +void idea_set_encrypt_key(const unsigned char *key, IDEA_KEY_SCHEDULE *ks); void idea_set_decrypt_key(IDEA_KEY_SCHEDULE *ek, IDEA_KEY_SCHEDULE *dk); -void idea_cbc_encrypt(unsigned char *in, unsigned char *out, +void idea_cbc_encrypt(const unsigned char *in, unsigned char *out, long length, IDEA_KEY_SCHEDULE *ks, unsigned char *iv,int enc); -void idea_cfb64_encrypt(unsigned char *in, unsigned char *out, +void idea_cfb64_encrypt(const unsigned char *in, unsigned char *out, long length, IDEA_KEY_SCHEDULE *ks, unsigned char *iv, int *num,int enc); -void idea_ofb64_encrypt(unsigned char *in, unsigned char *out, +void idea_ofb64_encrypt(const unsigned char *in, unsigned char *out, long length, IDEA_KEY_SCHEDULE *ks, unsigned char *iv, int *num); void idea_encrypt(unsigned long *in, IDEA_KEY_SCHEDULE *ks); #ifdef __cplusplus -- cgit v1.2.3