#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)
{ … }
int mbedtls_ripemd160_starts(mbedtls_ripemd160_context *ctx)
{ … }
#if !defined(MBEDTLS_RIPEMD160_PROCESS_ALT)
int mbedtls_internal_ripemd160_process(mbedtls_ripemd160_context *ctx,
const unsigned char data[64])
{ … }
#endif
int mbedtls_ripemd160_update(mbedtls_ripemd160_context *ctx,
const unsigned char *input,
size_t ilen)
{ … }
static const unsigned char ripemd160_padding[64] = …;
int mbedtls_ripemd160_finish(mbedtls_ripemd160_context *ctx,
unsigned char output[20])
{ … }
#endif
int mbedtls_ripemd160(const unsigned char *input,
size_t ilen,
unsigned char output[20])
{ … }
#if defined(MBEDTLS_SELF_TEST)
#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] = …;
int mbedtls_ripemd160_self_test(int verbose)
{ … }
#endif
#endif