diff options
author | Ulf Möller <ulf@openssl.org> | 1999-04-19 21:31:43 +0000 |
---|---|---|
committer | Ulf Möller <ulf@openssl.org> | 1999-04-19 21:31:43 +0000 |
commit | 6b691a5c85ddc4e407e32781841fee5c029506cd (patch) | |
tree | 436f1127406e1cacfe83dfcbfff824d89c47d834 /crypto/evp/e_cbc_r2.c | |
parent | 3edd7ed15de229230f74c79c3d71e7c9c674cf4f (diff) | |
download | openssl-6b691a5c85ddc4e407e32781841fee5c029506cd.tar.gz |
Change functions to ANSI C.
Diffstat (limited to 'crypto/evp/e_cbc_r2.c')
-rw-r--r-- | crypto/evp/e_cbc_r2.c | 34 |
1 files changed, 11 insertions, 23 deletions
diff --git a/crypto/evp/e_cbc_r2.c b/crypto/evp/e_cbc_r2.c index 57d46129b6..b30ff66592 100644 --- a/crypto/evp/e_cbc_r2.c +++ b/crypto/evp/e_cbc_r2.c @@ -126,26 +126,23 @@ static EVP_CIPHER r2_40_cbc_cipher= rc2_get_asn1_type_and_iv, }; -EVP_CIPHER *EVP_rc2_cbc() +EVP_CIPHER *EVP_rc2_cbc(void) { return(&r2_cbc_cipher); } -EVP_CIPHER *EVP_rc2_64_cbc() +EVP_CIPHER *EVP_rc2_64_cbc(void) { return(&r2_64_cbc_cipher); } -EVP_CIPHER *EVP_rc2_40_cbc() +EVP_CIPHER *EVP_rc2_40_cbc(void) { return(&r2_40_cbc_cipher); } -static void rc2_cbc_init_key(ctx,key,iv,enc) -EVP_CIPHER_CTX *ctx; -unsigned char *key; -unsigned char *iv; -int enc; +static void rc2_cbc_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, + unsigned char *iv, int enc) { if (iv != NULL) memcpy(&(ctx->oiv[0]),iv,8); @@ -155,11 +152,8 @@ int enc; key,EVP_CIPHER_CTX_key_length(ctx)*8); } -static void rc2_cbc_cipher(ctx,out,in,inl) -EVP_CIPHER_CTX *ctx; -unsigned char *out; -unsigned char *in; -unsigned int inl; +static void rc2_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, + unsigned char *in, unsigned int inl) { RC2_cbc_encrypt( in,out,(long)inl, @@ -167,8 +161,7 @@ unsigned int inl; ctx->encrypt); } -static int rc2_meth_to_magic(e) -const EVP_CIPHER *e; +static int rc2_meth_to_magic(const EVP_CIPHER *e) { int i; @@ -179,8 +172,7 @@ const EVP_CIPHER *e; else return(0); } -static EVP_CIPHER *rc2_magic_to_meth(i) -int i; +static EVP_CIPHER *rc2_magic_to_meth(int i) { if (i == RC2_128_MAGIC) return(EVP_rc2_cbc()); else if (i == RC2_64_MAGIC) return(EVP_rc2_64_cbc()); @@ -192,9 +184,7 @@ int i; } } -static int rc2_get_asn1_type_and_iv(c,type) -EVP_CIPHER_CTX *c; -ASN1_TYPE *type; +static int rc2_get_asn1_type_and_iv(EVP_CIPHER_CTX *c, ASN1_TYPE *type) { long num=0; int i=0,l; @@ -220,9 +210,7 @@ ASN1_TYPE *type; return(i); } -static int rc2_set_asn1_type_and_iv(c,type) -EVP_CIPHER_CTX *c; -ASN1_TYPE *type; +static int rc2_set_asn1_type_and_iv(EVP_CIPHER_CTX *c, ASN1_TYPE *type) { long num; int i=0,j; |