00001
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 #ifndef MBEDTLS_MD4_H
00030 #define MBEDTLS_MD4_H
00031
00032 #if !defined(MBEDTLS_CONFIG_FILE)
00033 #include "config.h"
00034 #else
00035 #include MBEDTLS_CONFIG_FILE
00036 #endif
00037
00038 #include <stddef.h>
00039 #include <stdint.h>
00040
00041 #define MBEDTLS_ERR_MD4_HW_ACCEL_FAILED -0x002D
00043 #if !defined(MBEDTLS_MD4_ALT)
00044
00045
00046
00047 #ifdef __cplusplus
00048 extern "C" {
00049 #endif
00050
00059 typedef struct
00060 {
00061 uint32_t total[2];
00062 uint32_t state[4];
00063 unsigned char buffer[64];
00064 }
00065 mbedtls_md4_context;
00066
00077 void mbedtls_md4_init( mbedtls_md4_context *ctx );
00078
00089 void mbedtls_md4_free( mbedtls_md4_context *ctx );
00090
00102 void mbedtls_md4_clone( mbedtls_md4_context *dst,
00103 const mbedtls_md4_context *src );
00104
00116 int mbedtls_md4_starts_ret( mbedtls_md4_context *ctx );
00117
00132 int mbedtls_md4_update_ret( mbedtls_md4_context *ctx,
00133 const unsigned char *input,
00134 size_t ilen );
00135
00149 int mbedtls_md4_finish_ret( mbedtls_md4_context *ctx,
00150 unsigned char output[16] );
00151
00165 int mbedtls_internal_md4_process( mbedtls_md4_context *ctx,
00166 const unsigned char data[64] );
00167
00168 #if !defined(MBEDTLS_DEPRECATED_REMOVED)
00169 #if defined(MBEDTLS_DEPRECATED_WARNING)
00170 #define MBEDTLS_DEPRECATED __attribute__((deprecated))
00171 #else
00172 #define MBEDTLS_DEPRECATED
00173 #endif
00174
00186 MBEDTLS_DEPRECATED void mbedtls_md4_starts( mbedtls_md4_context *ctx );
00187
00202 MBEDTLS_DEPRECATED void mbedtls_md4_update( mbedtls_md4_context *ctx,
00203 const unsigned char *input,
00204 size_t ilen );
00205
00219 MBEDTLS_DEPRECATED void mbedtls_md4_finish( mbedtls_md4_context *ctx,
00220 unsigned char output[16] );
00221
00235 MBEDTLS_DEPRECATED void mbedtls_md4_process( mbedtls_md4_context *ctx,
00236 const unsigned char data[64] );
00237
00238 #undef MBEDTLS_DEPRECATED
00239 #endif
00240
00241 #ifdef __cplusplus
00242 }
00243 #endif
00244
00245 #else
00246 #include "md4_alt.h"
00247 #endif
00248
00249 #ifdef __cplusplus
00250 extern "C" {
00251 #endif
00252
00267 int mbedtls_md4_ret( const unsigned char *input,
00268 size_t ilen,
00269 unsigned char output[16] );
00270
00271 #if !defined(MBEDTLS_DEPRECATED_REMOVED)
00272 #if defined(MBEDTLS_DEPRECATED_WARNING)
00273 #define MBEDTLS_DEPRECATED __attribute__((deprecated))
00274 #else
00275 #define MBEDTLS_DEPRECATED
00276 #endif
00277
00291 MBEDTLS_DEPRECATED void mbedtls_md4( const unsigned char *input,
00292 size_t ilen,
00293 unsigned char output[16] );
00294
00295 #undef MBEDTLS_DEPRECATED
00296 #endif
00297
00308 int mbedtls_md4_self_test( int verbose );
00309
00310 #ifdef __cplusplus
00311 }
00312 #endif
00313
00314 #endif