godot/thirdparty/mbedtls/library/ripemd160.c

/*
 *  RIPE MD-160 implementation
 *
 *  Copyright The Mbed TLS Contributors
 *  SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
 */

/*
 *  The RIPEMD-160 algorithm was designed by RIPE in 1996
 *  http://homes.esat.kuleuven.be/~bosselae/mbedtls_ripemd160.html
 *  http://ehash.iaik.tugraz.at/wiki/RIPEMD-160
 */

#include "common.h"

#if defined(MBEDTLS_RIPEMD160_C)

#include "mbedtls/ripemd160.h"
#include "mbedtls/platform_util.h"
#include "mbedtls/error.h"

#include <string.h>

#include "mbedtls/platform.h"

#if !defined(MBEDTLS_RIPEMD160_ALT)

void mbedtls_ripemd160_init(mbedtls_ripemd160_context *ctx)
{}

void mbedtls_ripemd160_free(mbedtls_ripemd160_context *ctx)
{}

void mbedtls_ripemd160_clone(mbedtls_ripemd160_context *dst,
                             const mbedtls_ripemd160_context *src)
{}

/*
 * RIPEMD-160 context setup
 */
int mbedtls_ripemd160_starts(mbedtls_ripemd160_context *ctx)
{}

#if !defined(MBEDTLS_RIPEMD160_PROCESS_ALT)
/*
 * Process one block
 */
int mbedtls_internal_ripemd160_process(mbedtls_ripemd160_context *ctx,
                                       const unsigned char data[64])
{}

#endif /* !MBEDTLS_RIPEMD160_PROCESS_ALT */

/*
 * RIPEMD-160 process buffer
 */
int mbedtls_ripemd160_update(mbedtls_ripemd160_context *ctx,
                             const unsigned char *input,
                             size_t ilen)
{}

static const unsigned char ripemd160_padding[64] =;

/*
 * RIPEMD-160 final digest
 */
int mbedtls_ripemd160_finish(mbedtls_ripemd160_context *ctx,
                             unsigned char output[20])
{}

#endif /* ! MBEDTLS_RIPEMD160_ALT */

/*
 * output = RIPEMD-160( input buffer )
 */
int mbedtls_ripemd160(const unsigned char *input,
                      size_t ilen,
                      unsigned char output[20])
{}

#if defined(MBEDTLS_SELF_TEST)
/*
 * Test vectors from the RIPEMD-160 paper and
 * http://homes.esat.kuleuven.be/~bosselae/mbedtls_ripemd160.html#HMAC
 */
#define TESTS
static const unsigned char ripemd160_test_str[TESTS][81] =;

static const size_t ripemd160_test_strlen[TESTS] =;

static const unsigned char ripemd160_test_md[TESTS][20] =;

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

#endif /* MBEDTLS_SELF_TEST */

#endif /* MBEDTLS_RIPEMD160_C */