godot/thirdparty/mbedtls/library/md5.c

/*
 *  RFC 1321 compliant MD5 implementation
 *
 *  Copyright The Mbed TLS Contributors
 *  SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
 */
/*
 *  The MD5 algorithm was designed by Ron Rivest in 1991.
 *
 *  http://www.ietf.org/rfc/rfc1321.txt
 */

#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)
{}

/*
 * MD5 context setup
 */
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 /* !MBEDTLS_MD5_PROCESS_ALT */

/*
 * MD5 process buffer
 */
int mbedtls_md5_update(mbedtls_md5_context *ctx,
                       const unsigned char *input,
                       size_t ilen)
{}

/*
 * MD5 final digest
 */
int mbedtls_md5_finish(mbedtls_md5_context *ctx,
                       unsigned char output[16])
{}

#endif /* !MBEDTLS_MD5_ALT */

/*
 * output = MD5( input buffer )
 */
int mbedtls_md5(const unsigned char *input,
                size_t ilen,
                unsigned char output[16])
{}

#if defined(MBEDTLS_SELF_TEST)
/*
 * RFC 1321 test vectors
 */
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] =;

/*
 * Checkup routine
 */
int mbedtls_md5_self_test(int verbose)
{}

#endif /* MBEDTLS_SELF_TEST */

#endif /* MBEDTLS_MD5_C */