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 #ifndef MBEDTLS_MD4_H
00055 #define MBEDTLS_MD4_H
00056
00057 #if !defined(MBEDTLS_CONFIG_FILE)
00058 #include "config.h"
00059 #else
00060 #include MBEDTLS_CONFIG_FILE
00061 #endif
00062
00063 #include <stddef.h>
00064 #include <stdint.h>
00065
00066 #define MBEDTLS_ERR_MD4_HW_ACCEL_FAILED -0x002D
00068 #if !defined(MBEDTLS_MD4_ALT)
00069
00070
00071
00072 #ifdef __cplusplus
00073 extern "C" {
00074 #endif
00075
00084 typedef struct
00085 {
00086 uint32_t total[2];
00087 uint32_t state[4];
00088 unsigned char buffer[64];
00089 }
00090 mbedtls_md4_context;
00091
00102 void mbedtls_md4_init( mbedtls_md4_context *ctx );
00103
00114 void mbedtls_md4_free( mbedtls_md4_context *ctx );
00115
00127 void mbedtls_md4_clone( mbedtls_md4_context *dst,
00128 const mbedtls_md4_context *src );
00129
00141 int mbedtls_md4_starts_ret( mbedtls_md4_context *ctx );
00142
00157 int mbedtls_md4_update_ret( mbedtls_md4_context *ctx,
00158 const unsigned char *input,
00159 size_t ilen );
00160
00174 int mbedtls_md4_finish_ret( mbedtls_md4_context *ctx,
00175 unsigned char output[16] );
00176
00190 int mbedtls_internal_md4_process( mbedtls_md4_context *ctx,
00191 const unsigned char data[64] );
00192
00193 #if !defined(MBEDTLS_DEPRECATED_REMOVED)
00194 #if defined(MBEDTLS_DEPRECATED_WARNING)
00195 #define MBEDTLS_DEPRECATED __attribute__((deprecated))
00196 #else
00197 #define MBEDTLS_DEPRECATED
00198 #endif
00199
00211 MBEDTLS_DEPRECATED void mbedtls_md4_starts( mbedtls_md4_context *ctx );
00212
00227 MBEDTLS_DEPRECATED void mbedtls_md4_update( mbedtls_md4_context *ctx,
00228 const unsigned char *input,
00229 size_t ilen );
00230
00244 MBEDTLS_DEPRECATED void mbedtls_md4_finish( mbedtls_md4_context *ctx,
00245 unsigned char output[16] );
00246
00260 MBEDTLS_DEPRECATED void mbedtls_md4_process( mbedtls_md4_context *ctx,
00261 const unsigned char data[64] );
00262
00263 #undef MBEDTLS_DEPRECATED
00264 #endif
00265
00266 #ifdef __cplusplus
00267 }
00268 #endif
00269
00270 #else
00271 #include "md4_alt.h"
00272 #endif
00273
00274 #ifdef __cplusplus
00275 extern "C" {
00276 #endif
00277
00292 int mbedtls_md4_ret( const unsigned char *input,
00293 size_t ilen,
00294 unsigned char output[16] );
00295
00296 #if !defined(MBEDTLS_DEPRECATED_REMOVED)
00297 #if defined(MBEDTLS_DEPRECATED_WARNING)
00298 #define MBEDTLS_DEPRECATED __attribute__((deprecated))
00299 #else
00300 #define MBEDTLS_DEPRECATED
00301 #endif
00302
00316 MBEDTLS_DEPRECATED void mbedtls_md4( const unsigned char *input,
00317 size_t ilen,
00318 unsigned char output[16] );
00319
00320 #undef MBEDTLS_DEPRECATED
00321 #endif
00322
00333 int mbedtls_md4_self_test( int verbose );
00334
00335 #ifdef __cplusplus
00336 }
00337 #endif
00338
00339 #endif