/[rdesktop]/sourceforge.net/trunk/rdesktop/crypto/rc4.h
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /sourceforge.net/trunk/rdesktop/crypto/rc4.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 11 by matty, Tue Aug 15 10:32:09 2000 UTC revision 32 by matty, Sat Sep 15 09:37:17 2001 UTC
# Line 1  Line 1 
1  /* crypto/rc4/rc4.org */  /* crypto/rc4/rc4.h */
2  /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)  /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)
3   * All rights reserved.   * All rights reserved.
4   *   *
# Line 56  Line 56 
56   * [including the GNU Public Licence.]   * [including the GNU Public Licence.]
57   */   */
58    
 /* 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  
  */  
   
59  #ifndef HEADER_RC4_H  #ifndef HEADER_RC4_H
60  #define HEADER_RC4_H  #define HEADER_RC4_H
61    
62    #ifdef NO_RC4
63    #error RC4 is disabled.
64    #endif
65    
66  #ifdef  __cplusplus  #ifdef  __cplusplus
67  extern "C" {  extern "C" {
68  #endif  #endif
69    
70  /* using int types make the structure larger but make the code faster  /* using int types make the structure larger but make the code faster
71   * on most boxes I have tested - up to %20 faster. */   * on most boxes I have tested - up to %20 faster. */
72    /*
73     * I don't know what does "most" mean, but declaring "int" is a must on:
74     * - Intel P6 because partial register stalls are very expensive;
75     * - elder Alpha because it lacks byte load/store instructions;
76     */
77  #define RC4_INT unsigned int  #define RC4_INT unsigned int
78    
79    /*
80     * This enables code handling data aligned at natural CPU word
81     * boundary. See rc4_enc.c for further details.
82     */
83    #undef RC4_CHUNK
84    
85    /* if this is defined data[i] is used instead of *data, this is a %20
86     * speedup on x86 */
87    #define RC4_INDEX
88    
89  typedef struct rc4_key_st  typedef struct rc4_key_st
90          {          {
91          RC4_INT x,y;          RC4_INT x,y;
92          RC4_INT data[256];          RC4_INT data[256];
93          } RC4_KEY;          } RC4_KEY;
94    
 #ifndef NOPROTO  
95    
96  char *RC4_options(void);  const char *RC4_options(void);
97  void RC4_set_key(RC4_KEY *key, int len, unsigned char *data);  void RC4_set_key(RC4_KEY *key, int len, const unsigned char *data);
98  void RC4(RC4_KEY *key, unsigned long len, unsigned char *indata,  void RC4(RC4_KEY *key, unsigned long len, const unsigned char *indata,
99                  unsigned char *outdata);                  unsigned char *outdata);
100    
 #else  
   
 char *RC4_options();  
 void RC4_set_key();  
 void RC4();  
   
 #endif  
   
101  #ifdef  __cplusplus  #ifdef  __cplusplus
102  }  }
103  #endif  #endif

Legend:
Removed from v.11  
changed lines
  Added in v.32

  ViewVC Help
Powered by ViewVC 1.1.26