PolarSSL v1.3.9
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
43extern "C" {
44#endif
45
49typedef struct
50{
51 int x;
52 int y;
53 unsigned char m[256];
54}
56
63
70
78void arc4_setup( arc4_context *ctx, const unsigned char *key,
79 unsigned int keylen );
80
91int 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
103extern "C" {
104#endif
105
111int arc4_self_test( int verbose );
112
113#ifdef __cplusplus
114}
115#endif
116
117#endif /* arc4.h */
void arc4_setup(arc4_context *ctx, const unsigned char *key, unsigned int keylen)
ARC4 key schedule.
void arc4_init(arc4_context *ctx)
Initialize ARC4 context.
int arc4_crypt(arc4_context *ctx, size_t length, const unsigned char *input, unsigned char *output)
ARC4 cipher function.
void arc4_free(arc4_context *ctx)
Clear ARC4 context.
int arc4_self_test(int verbose)
Checkup routine.
Configuration options (set of defines)
ARC4 context structure.
Definition arc4.h:50
int x
Definition arc4.h:51
int y
Definition arc4.h:52