PolarSSL v1.3.7
arc4.h
Go to the documentation of this file.
1 
27 #ifndef POLARSSL_ARC4_H
28 #define POLARSSL_ARC4_H
29 
30 #if !defined(POLARSSL_CONFIG_FILE)
31 #include "config.h"
32 #else
33 #include POLARSSL_CONFIG_FILE
34 #endif
35 
36 #include <string.h>
37 
38 #if !defined(POLARSSL_ARC4_ALT)
39 // Regular implementation
40 //
41 
42 #ifdef __cplusplus
43 extern "C" {
44 #endif
45 
49 typedef struct
50 {
51  int x;
52  int y;
53  unsigned char m[256];
54 }
56 
64 void arc4_setup( arc4_context *ctx, const unsigned char *key,
65  unsigned int keylen );
66 
77 int arc4_crypt( arc4_context *ctx, size_t length, const unsigned char *input,
78  unsigned char *output );
79 
80 #ifdef __cplusplus
81 }
82 #endif
83 
84 #else /* POLARSSL_ARC4_ALT */
85 #include "arc4_alt.h"
86 #endif /* POLARSSL_ARC4_ALT */
87 
88 #ifdef __cplusplus
89 extern "C" {
90 #endif
91 
97 int arc4_self_test( int verbose );
98 
99 #ifdef __cplusplus
100 }
101 #endif
102 
103 #endif /* arc4.h */
int arc4_crypt(arc4_context *ctx, size_t length, const unsigned char *input, unsigned char *output)
ARC4 cipher function.
void arc4_setup(arc4_context *ctx, const unsigned char *key, unsigned int keylen)
ARC4 key schedule.
int arc4_self_test(int verbose)
Checkup routine.
Configuration options (set of defines)
int y
Definition: arc4.h:52
int x
Definition: arc4.h:51
ARC4 context structure.
Definition: arc4.h:49