evp: prevent underflow in base64 decoding
[openssl.git] / crypto / rc4 / rc4.h
index c558651af80c2e6b8707dd51e21e0fb113918436..88ceb46bc54d11fbc613c049c24c938d6bcfada5 100644 (file)
@@ -1,4 +1,4 @@
-/* crypto/rc4/rc4.org */
+/* crypto/rc4/rc4.h */
 /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)
  * All rights reserved.
  *
  * [including the GNU Public Licence.]
  */
 
-/* WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
- *
- * Always modify rc4.org since rc4.h is automatically generated from
- * it during SSLeay configuration.
- *
- * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING 
- */
-
 #ifndef HEADER_RC4_H
 #define HEADER_RC4_H
 
+#include <openssl/opensslconf.h> /* OPENSSL_NO_RC4, RC4_INT */
+#ifdef OPENSSL_NO_RC4
+#error RC4 is disabled.
+#endif
+
+#include <stddef.h>
+
 #ifdef  __cplusplus
 extern "C" {
 #endif
 
-/* using int types make the structure larger but make the code faster
- * on most boxes I have tested - up to %20 faster. */
-#define RC4_INT unsigned int
-
 typedef struct rc4_key_st
        {
        RC4_INT x,y;
        RC4_INT data[256];
        } RC4_KEY;
 
-#ifndef NOPROTO
  
-char *RC4_options(void);
-void RC4_set_key(RC4_KEY *key, int len, unsigned char *data);
-void RC4(RC4_KEY *key, unsigned long len, unsigned char *indata,
+const char *RC4_options(void);
+void RC4_set_key(RC4_KEY *key, int len, const unsigned char *data);
+void private_RC4_set_key(RC4_KEY *key, int len, const unsigned char *data);
+void RC4(RC4_KEY *key, size_t len, const unsigned char *indata,
                unsigned char *outdata);
 
-#else
-
-char *RC4_options();
-void RC4_set_key();
-void RC4();
-
-#endif
-
 #ifdef  __cplusplus
 }
 #endif