diff options
author | Ben Laurie <ben@openssl.org> | 2000-06-03 14:13:58 +0000 |
---|---|---|
committer | Ben Laurie <ben@openssl.org> | 2000-06-03 14:13:58 +0000 |
commit | 1921eaad645c9a9f62c1ed79b7ae87c417aa8a3c (patch) | |
tree | 3cfb98b7de9296d88960349a0cfee184e72670b6 /crypto/evp/e_des3.c | |
parent | 26a3a48d65c7464b400ec1de439994d7f0d25fed (diff) |
EVP constification.
Diffstat (limited to 'crypto/evp/e_des3.c')
-rw-r--r-- | crypto/evp/e_des3.c | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/crypto/evp/e_des3.c b/crypto/evp/e_des3.c index c11c2b6856..a9aba4ae70 100644 --- a/crypto/evp/e_des3.c +++ b/crypto/evp/e_des3.c @@ -63,15 +63,16 @@ #include <openssl/objects.h> #include "evp_locl.h" -static int des_ede_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, - unsigned char *iv,int enc); +static int des_ede_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, + const unsigned char *iv,int enc); -static int des_ede3_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, - unsigned char *iv,int enc); +static int des_ede3_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, + const unsigned char *iv,int enc); /* Because of various casts and different args can't use IMPLEMENT_BLOCK_CIPHER */ -static int des_ede_ecb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, unsigned char *in, unsigned int inl) +static int des_ede_ecb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, + const unsigned char *in, unsigned int inl) { BLOCK_CIPHER_ecb_loop() des_ecb3_encrypt((des_cblock *)(in + i), (des_cblock *)(out + i), @@ -80,7 +81,8 @@ static int des_ede_ecb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, unsigned return 1; } -static int des_ede_ofb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, unsigned char *in, unsigned int inl) +static int des_ede_ofb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, + const unsigned char *in, unsigned int inl) { des_ede3_ofb64_encrypt(in, out, (long)inl, ctx->c.des_ede.ks1, ctx->c.des_ede.ks2, ctx->c.des_ede.ks3, @@ -88,7 +90,8 @@ static int des_ede_ofb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, unsigned return 1; } -static int des_ede_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, unsigned char *in, unsigned int inl) +static int des_ede_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, + const unsigned char *in, unsigned int inl) { des_ede3_cbc_encrypt(in, out, (long)inl, ctx->c.des_ede.ks1, ctx->c.des_ede.ks2, ctx->c.des_ede.ks3, @@ -96,7 +99,8 @@ static int des_ede_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, unsigned return 1; } -static int des_ede_cfb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, unsigned char *in, unsigned int inl) +static int des_ede_cfb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, + const unsigned char *in, unsigned int inl) { des_ede3_cfb64_encrypt(in, out, (long)inl, ctx->c.des_ede.ks1, ctx->c.des_ede.ks2, ctx->c.des_ede.ks3, @@ -124,8 +128,8 @@ BLOCK_CIPHER_defs(des_ede3, des_ede, NID_des_ede3, 8, 24, 8, EVP_CIPHER_get_asn1_iv, NULL) -static int des_ede_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, - unsigned char *iv, int enc) +static int des_ede_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, + const unsigned char *iv, int enc) { des_cblock *deskey = (des_cblock *)key; @@ -137,8 +141,8 @@ static int des_ede_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, return 1; } -static int des_ede3_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, - unsigned char *iv, int enc) +static int des_ede3_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, + const unsigned char *iv, int enc) { des_cblock *deskey = (des_cblock *)key; |