mbed TLS v2.2.1
arc4.h
Go to the documentation of this file.
1 
23 #ifndef MBEDTLS_ARC4_H
24 #define MBEDTLS_ARC4_H
25 
26 #if !defined(MBEDTLS_CONFIG_FILE)
27 #include "config.h"
28 #else
29 #include MBEDTLS_CONFIG_FILE
30 #endif
31 
32 #include <stddef.h>
33 
34 #if !defined(MBEDTLS_ARC4_ALT)
35 // Regular implementation
36 //
37 
38 #ifdef __cplusplus
39 extern "C" {
40 #endif
41 
45 typedef struct
46 {
47  int x;
48  int y;
49  unsigned char m[256];
50 }
51 mbedtls_arc4_context;
52 
58 void mbedtls_arc4_init( mbedtls_arc4_context *ctx );
59 
65 void mbedtls_arc4_free( mbedtls_arc4_context *ctx );
66 
74 void mbedtls_arc4_setup( mbedtls_arc4_context *ctx, const unsigned char *key,
75  unsigned int keylen );
76 
87 int mbedtls_arc4_crypt( mbedtls_arc4_context *ctx, size_t length, const unsigned char *input,
88  unsigned char *output );
89 
90 #ifdef __cplusplus
91 }
92 #endif
93 
94 #else /* MBEDTLS_ARC4_ALT */
95 #include "arc4_alt.h"
96 #endif /* MBEDTLS_ARC4_ALT */
97 
98 #ifdef __cplusplus
99 extern "C" {
100 #endif
101 
107 int mbedtls_arc4_self_test( int verbose );
108 
109 #ifdef __cplusplus
110 }
111 #endif
112 
113 #endif /* arc4.h */
Configuration options (set of defines)
int mbedtls_arc4_self_test(int verbose)
Checkup routine.