mbed TLS v2.0.0
arc4.h
Go to the documentation of this file.
1 
24 #ifndef MBEDTLS_ARC4_H
25 #define MBEDTLS_ARC4_H
26 
27 #if !defined(MBEDTLS_CONFIG_FILE)
28 #include "config.h"
29 #else
30 #include MBEDTLS_CONFIG_FILE
31 #endif
32 
33 #include <stddef.h>
34 
35 #if !defined(MBEDTLS_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 
60 
67 
75 void mbedtls_arc4_setup( mbedtls_arc4_context *ctx, const unsigned char *key,
76  unsigned int keylen );
77 
88 int mbedtls_arc4_crypt( mbedtls_arc4_context *ctx, size_t length, const unsigned char *input,
89  unsigned char *output );
90 
91 #ifdef __cplusplus
92 }
93 #endif
94 
95 #else /* MBEDTLS_ARC4_ALT */
96 #include "arc4_alt.h"
97 #endif /* MBEDTLS_ARC4_ALT */
98 
99 #ifdef __cplusplus
100 extern "C" {
101 #endif
102 
108 int mbedtls_arc4_self_test( int verbose );
109 
110 #ifdef __cplusplus
111 }
112 #endif
113 
114 #endif /* arc4.h */
int mbedtls_arc4_crypt(mbedtls_arc4_context *ctx, size_t length, const unsigned char *input, unsigned char *output)
ARC4 cipher function.
Compatibility names (set of defines)
void mbedtls_arc4_init(mbedtls_arc4_context *ctx)
Initialize ARC4 context.
ARC4 context structure.
Definition: arc4.h:46
void mbedtls_arc4_free(mbedtls_arc4_context *ctx)
Clear ARC4 context.
void mbedtls_arc4_setup(mbedtls_arc4_context *ctx, const unsigned char *key, unsigned int keylen)
ARC4 key schedule.
int mbedtls_arc4_self_test(int verbose)
Checkup routine.