#include "common.h"
#if defined(MBEDTLS_MD5_C)
#include "mbedtls/md5.h"
#include "mbedtls/platform_util.h"
#include "mbedtls/error.h"
#include <string.h>
#include "mbedtls/platform.h"
#if !defined(MBEDTLS_MD5_ALT)
void mbedtls_md5_init(mbedtls_md5_context *ctx)
{ … }
void mbedtls_md5_free(mbedtls_md5_context *ctx)
{ … }
void mbedtls_md5_clone(mbedtls_md5_context *dst,
const mbedtls_md5_context *src)
{ … }
int mbedtls_md5_starts(mbedtls_md5_context *ctx)
{ … }
#if !defined(MBEDTLS_MD5_PROCESS_ALT)
int mbedtls_internal_md5_process(mbedtls_md5_context *ctx,
const unsigned char data[64])
{ … }
#endif
int mbedtls_md5_update(mbedtls_md5_context *ctx,
const unsigned char *input,
size_t ilen)
{ … }
int mbedtls_md5_finish(mbedtls_md5_context *ctx,
unsigned char output[16])
{ … }
#endif
int mbedtls_md5(const unsigned char *input,
size_t ilen,
unsigned char output[16])
{ … }
#if defined(MBEDTLS_SELF_TEST)
static const unsigned char md5_test_buf[7][81] = …;
static const size_t md5_test_buflen[7] = …;
static const unsigned char md5_test_sum[7][16] = …;
int mbedtls_md5_self_test(int verbose)
{ … }
#endif
#endif