mbed TLS v1.3.11
arc4.h
Go to the documentation of this file.
1 
24 #ifndef POLARSSL_ARC4_H
25 #define POLARSSL_ARC4_H
26 
27 #if !defined(POLARSSL_CONFIG_FILE)
28 #include "config.h"
29 #else
30 #include POLARSSL_CONFIG_FILE
31 #endif
32 
33 #include <stddef.h>
34 
35 #if !defined(POLARSSL_ARC4_ALT)
36 // Regular implementation
37 //
38 
39 #ifdef __cplusplus
40 extern "C" {
41 #endif
42 
46 typedef struct
47 {
48  int x;
49  int y;
50  unsigned char m[256];
51 }
53 
59 void arc4_init( arc4_context *ctx );
60 
66 void arc4_free( arc4_context *ctx );
67 
75 void arc4_setup( arc4_context *ctx, const unsigned char *key,
76  unsigned int keylen );
77 
88 int arc4_crypt( arc4_context *ctx, size_t length, const unsigned char *input,
89  unsigned char *output );
90 
91 #ifdef __cplusplus
92 }
93 #endif
94 
95 #else /* POLARSSL_ARC4_ALT */
96 #include "arc4_alt.h"
97 #endif /* POLARSSL_ARC4_ALT */
98 
99 #ifdef __cplusplus
100 extern "C" {
101 #endif
102 
108 int arc4_self_test( int verbose );
109 
110 #ifdef __cplusplus
111 }
112 #endif
113 
114 #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:49
int x
Definition: arc4.h:48
ARC4 context structure.
Definition: arc4.h:46