#include "common.h"
#if defined(MBEDTLS_SHA1_C)
#include "mbedtls/sha1.h"
#include "mbedtls/platform_util.h"
#include "mbedtls/error.h"
#include <string.h>
#include "mbedtls/platform.h"
#if !defined(MBEDTLS_SHA1_ALT)
void mbedtls_sha1_init(mbedtls_sha1_context *ctx)
{ … }
void mbedtls_sha1_free(mbedtls_sha1_context *ctx)
{ … }
void mbedtls_sha1_clone(mbedtls_sha1_context *dst,
const mbedtls_sha1_context *src)
{ … }
int mbedtls_sha1_starts(mbedtls_sha1_context *ctx)
{ … }
#if !defined(MBEDTLS_SHA1_PROCESS_ALT)
int mbedtls_internal_sha1_process(mbedtls_sha1_context *ctx,
const unsigned char data[64])
{ … }
#endif
int mbedtls_sha1_update(mbedtls_sha1_context *ctx,
const unsigned char *input,
size_t ilen)
{ … }
int mbedtls_sha1_finish(mbedtls_sha1_context *ctx,
unsigned char output[20])
{ … }
#endif
int mbedtls_sha1(const unsigned char *input,
size_t ilen,
unsigned char output[20])
{ … }
#if defined(MBEDTLS_SELF_TEST)
static const unsigned char sha1_test_buf[3][57] = …;
static const size_t sha1_test_buflen[3] = …;
static const unsigned char sha1_test_sum[3][20] = …;
int mbedtls_sha1_self_test(int verbose)
{ … }
#endif
#endif