arc4.h

Go to the documentation of this file.
00001 
00023 #ifndef MBEDTLS_ARC4_H
00024 #define MBEDTLS_ARC4_H
00025 
00026 #if !defined(MBEDTLS_CONFIG_FILE)
00027 #include "config.h"
00028 #else
00029 #include MBEDTLS_CONFIG_FILE
00030 #endif
00031 
00032 #include <stddef.h>
00033 
00034 #if !defined(MBEDTLS_ARC4_ALT)
00035 // Regular implementation
00036 //
00037 
00038 #ifdef __cplusplus
00039 extern "C" {
00040 #endif
00041 
00045 typedef struct
00046 {
00047     int x;                      
00048     int y;                      
00049     unsigned char m[256];       
00050 }
00051 mbedtls_arc4_context;
00052 
00058 void mbedtls_arc4_init( mbedtls_arc4_context *ctx );
00059 
00065 void mbedtls_arc4_free( mbedtls_arc4_context *ctx );
00066 
00074 void mbedtls_arc4_setup( mbedtls_arc4_context *ctx, const unsigned char *key,
00075                  unsigned int keylen );
00076 
00087 int mbedtls_arc4_crypt( mbedtls_arc4_context *ctx, size_t length, const unsigned char *input,
00088                 unsigned char *output );
00089 
00090 #ifdef __cplusplus
00091 }
00092 #endif
00093 
00094 #else  /* MBEDTLS_ARC4_ALT */
00095 #include "arc4_alt.h"
00096 #endif /* MBEDTLS_ARC4_ALT */
00097 
00098 #ifdef __cplusplus
00099 extern "C" {
00100 #endif
00101 
00107 int mbedtls_arc4_self_test( int verbose );
00108 
00109 #ifdef __cplusplus
00110 }
00111 #endif
00112 
00113 #endif /* arc4.h */

Generated on 11 Mar 2017 for mbed TLS v2.4.2 by  doxygen 1.4.7