X-Git-Url: https://git.openssl.org/?a=blobdiff_plain;f=crypto%2Frc2%2Frc2.h;h=076c0a067ceefe615c52442ddd77459d005e33e9;hb=28ddfc61dc90ec257810ee089e2639196afa589f;hp=9232bbd564f17a7d9a17cb659f944523942c6dfb;hpb=7dfb0b774e6592dcbfe47015168a0ac8b44e2a17;p=openssl.git diff --git a/crypto/rc2/rc2.h b/crypto/rc2/rc2.h index 9232bbd564..076c0a067c 100644 --- a/crypto/rc2/rc2.h +++ b/crypto/rc2/rc2.h @@ -1,4 +1,4 @@ -/* crypto/rc2/rc2.org */ +/* crypto/rc2/rc2.h */ /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -56,60 +56,43 @@ * [including the GNU Public Licence.] */ -/* WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING - * - * Always modify rc2.org since rc2.h is automatically generated from - * it during SSLeay configuration. - * - * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING - */ - #ifndef HEADER_RC2_H #define HEADER_RC2_H -#ifdef __cplusplus -extern "C" { +#ifdef NO_RC2 +#error RC2 is disabled. #endif #define RC2_ENCRYPT 1 #define RC2_DECRYPT 0 -/* I need to put in a mod for the alpha - eay */ -#define RC2_INT unsigned int - +#include /* RC2_INT */ #define RC2_BLOCK 8 #define RC2_KEY_LENGTH 16 +#ifdef __cplusplus +extern "C" { +#endif + typedef struct rc2_key_st { RC2_INT data[64]; } RC2_KEY; -#ifndef NOPROTO -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); - -#else - -void RC2_set_key(); -void RC2_ecb_encrypt(); -void RC2_encrypt(); -void RC2_decrypt(); -void RC2_cbc_encrypt(); -void RC2_cfb64_encrypt(); -void RC2_ofb64_encrypt(); - -#endif +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 }