00001
00027 #ifndef POLARSSL_ARC4_H
00028 #define POLARSSL_ARC4_H
00029
00030 #include "config.h"
00031
00032 #include <string.h>
00033
00034 #if !defined(POLARSSL_ARC4_ALT)
00035
00036
00037
00038 #ifdef __cplusplus
00039 extern "C" {
00040 #endif
00041
00045 typedef struct
00046 {
00047 int x;
00048 int y;
00049 unsigned char m[256];
00050 }
00051 arc4_context;
00052
00060 void arc4_setup( arc4_context *ctx, const unsigned char *key, unsigned int keylen );
00061
00072 int arc4_crypt( arc4_context *ctx, size_t length, const unsigned char *input,
00073 unsigned char *output );
00074
00075 #ifdef __cplusplus
00076 }
00077 #endif
00078
00079 #else
00080 #include "arc4_alt.h"
00081 #endif
00082
00083 #ifdef __cplusplus
00084 extern "C" {
00085 #endif
00086
00092 int arc4_self_test( int verbose );
00093
00094 #ifdef __cplusplus
00095 }
00096 #endif
00097
00098 #endif