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);
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,
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;
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());
}
}
-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;
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;