PolarSSL v1.3.8
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 
62 void arc4_init( arc4_context *ctx );
63 
69 void arc4_free( arc4_context *ctx );
70 
78 void arc4_setup( arc4_context *ctx, const unsigned char *key,
79  unsigned int keylen );
80 
91 int arc4_crypt( arc4_context *ctx, size_t length, const unsigned char *input,
92  unsigned char *output );
93 
94 #ifdef __cplusplus
95 }
96 #endif
97 
98 #else /* POLARSSL_ARC4_ALT */
99 #include "arc4_alt.h"
100 #endif /* POLARSSL_ARC4_ALT */
101 
102 #ifdef __cplusplus
103 extern "C" {
104 #endif
105 
111 int arc4_self_test( int verbose );
112 
113 #ifdef __cplusplus
114 }
115 #endif
116 
117 #endif /* arc4.h */
int arc4_crypt(arc4_context *ctx, size_t length, const unsigned char *input, unsigned char *output)
ARC4 cipher function.
void arc4_init(arc4_context *ctx)
Initialize ARC4 context.
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)
void arc4_free(arc4_context *ctx)
Clear ARC4 context.
int y
Definition: arc4.h:52
int x
Definition: arc4.h:51
ARC4 context structure.
Definition: arc4.h:49