00001
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056 #ifndef MBEDTLS_MD4_H
00057 #define MBEDTLS_MD4_H
00058
00059 #if !defined(MBEDTLS_CONFIG_FILE)
00060 #include "config.h"
00061 #else
00062 #include MBEDTLS_CONFIG_FILE
00063 #endif
00064
00065 #include <stddef.h>
00066 #include <stdint.h>
00067
00068 #define MBEDTLS_ERR_MD4_HW_ACCEL_FAILED -0x002D
00070 #if !defined(MBEDTLS_MD4_ALT)
00071
00072
00073
00074 #ifdef __cplusplus
00075 extern "C" {
00076 #endif
00077
00086 typedef struct
00087 {
00088 uint32_t total[2];
00089 uint32_t state[4];
00090 unsigned char buffer[64];
00091 }
00092 mbedtls_md4_context;
00093
00104 void mbedtls_md4_init( mbedtls_md4_context *ctx );
00105
00116 void mbedtls_md4_free( mbedtls_md4_context *ctx );
00117
00129 void mbedtls_md4_clone( mbedtls_md4_context *dst,
00130 const mbedtls_md4_context *src );
00131
00143 int mbedtls_md4_starts_ret( mbedtls_md4_context *ctx );
00144
00159 int mbedtls_md4_update_ret( mbedtls_md4_context *ctx,
00160 const unsigned char *input,
00161 size_t ilen );
00162
00176 int mbedtls_md4_finish_ret( mbedtls_md4_context *ctx,
00177 unsigned char output[16] );
00178
00192 int mbedtls_internal_md4_process( mbedtls_md4_context *ctx,
00193 const unsigned char data[64] );
00194
00195 #if !defined(MBEDTLS_DEPRECATED_REMOVED)
00196 #if defined(MBEDTLS_DEPRECATED_WARNING)
00197 #define MBEDTLS_DEPRECATED __attribute__((deprecated))
00198 #else
00199 #define MBEDTLS_DEPRECATED
00200 #endif
00201
00213 MBEDTLS_DEPRECATED void mbedtls_md4_starts( mbedtls_md4_context *ctx );
00214
00229 MBEDTLS_DEPRECATED void mbedtls_md4_update( mbedtls_md4_context *ctx,
00230 const unsigned char *input,
00231 size_t ilen );
00232
00246 MBEDTLS_DEPRECATED void mbedtls_md4_finish( mbedtls_md4_context *ctx,
00247 unsigned char output[16] );
00248
00262 MBEDTLS_DEPRECATED void mbedtls_md4_process( mbedtls_md4_context *ctx,
00263 const unsigned char data[64] );
00264
00265 #undef MBEDTLS_DEPRECATED
00266 #endif
00267
00268 #ifdef __cplusplus
00269 }
00270 #endif
00271
00272 #else
00273 #include "md4_alt.h"
00274 #endif
00275
00276 #ifdef __cplusplus
00277 extern "C" {
00278 #endif
00279
00294 int mbedtls_md4_ret( const unsigned char *input,
00295 size_t ilen,
00296 unsigned char output[16] );
00297
00298 #if !defined(MBEDTLS_DEPRECATED_REMOVED)
00299 #if defined(MBEDTLS_DEPRECATED_WARNING)
00300 #define MBEDTLS_DEPRECATED __attribute__((deprecated))
00301 #else
00302 #define MBEDTLS_DEPRECATED
00303 #endif
00304
00318 MBEDTLS_DEPRECATED void mbedtls_md4( const unsigned char *input,
00319 size_t ilen,
00320 unsigned char output[16] );
00321
00322 #undef MBEDTLS_DEPRECATED
00323 #endif
00324
00335 int mbedtls_md4_self_test( int verbose );
00336
00337 #ifdef __cplusplus
00338 }
00339 #endif
00340
00341 #endif