PolarSSL v1.2.11
arc4.h
Go to the documentation of this file.
1 
27 #ifndef POLARSSL_ARC4_H
28 #define POLARSSL_ARC4_H
29 
30 #include "config.h"
31 
32 #include <string.h>
33 
34 #if !defined(POLARSSL_ARC4_ALT)
35 // Regular implementation
36 //
37 
41 typedef struct
42 {
43  int x;
44  int y;
45  unsigned char m[256];
46 }
48 
49 #ifdef __cplusplus
50 extern "C" {
51 #endif
52 
60 void arc4_setup( arc4_context *ctx, const unsigned char *key, unsigned int keylen );
61 
72 int arc4_crypt( arc4_context *ctx, size_t length, const unsigned char *input,
73  unsigned char *output );
74 
75 #ifdef __cplusplus
76 }
77 #endif
78 
79 #else /* POLARSSL_ARC4_ALT */
80 #include "arc4_alt.h"
81 #endif /* POLARSSL_ARC4_ALT */
82 
83 #ifdef __cplusplus
84 extern "C" {
85 #endif
86 
92 int arc4_self_test( int verbose );
93 
94 #ifdef __cplusplus
95 }
96 #endif
97 
98 #endif /* arc4.h */