mbed TLS v2.3.0
arc4.h
Go to the documentation of this file.
1 
25 #ifndef MBEDTLS_ARC4_H
26 #define MBEDTLS_ARC4_H
27 
28 #if !defined(MBEDTLS_CONFIG_FILE)
29 #include "config.h"
30 #else
31 #include MBEDTLS_CONFIG_FILE
32 #endif
33 
34 #include <stddef.h>
35 
36 #if !defined(MBEDTLS_ARC4_ALT)
37 // Regular implementation
38 //
39 
40 #ifdef __cplusplus
41 extern "C" {
42 #endif
43 
47 typedef struct
48 {
49  int x;
50  int y;
51  unsigned char m[256];
52 }
54 
61 
68 
76 void mbedtls_arc4_setup( mbedtls_arc4_context *ctx, const unsigned char *key,
77  unsigned int keylen );
78 
89 int mbedtls_arc4_crypt( mbedtls_arc4_context *ctx, size_t length, const unsigned char *input,
90  unsigned char *output );
91 
92 #ifdef __cplusplus
93 }
94 #endif
95 
96 #else /* MBEDTLS_ARC4_ALT */
97 #include "arc4_alt.h"
98 #endif /* MBEDTLS_ARC4_ALT */
99 
100 #ifdef __cplusplus
101 extern "C" {
102 #endif
103 
109 int mbedtls_arc4_self_test( int verbose );
110 
111 #ifdef __cplusplus
112 }
113 #endif
114 
115 #endif /* arc4.h */
int mbedtls_arc4_crypt(mbedtls_arc4_context *ctx, size_t length, const unsigned char *input, unsigned char *output)
ARC4 cipher function.
Configuration options (set of defines)
void mbedtls_arc4_init(mbedtls_arc4_context *ctx)
Initialize ARC4 context.
ARC4 context structure.
Definition: arc4.h:47
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.