Mbed TLS v3.6.1
Loading...
Searching...
No Matches
ripemd160.h
Go to the documentation of this file.
1
6/*
7 * Copyright The Mbed TLS Contributors
8 * SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
9 */
10#ifndef MBEDTLS_RIPEMD160_H
11#define MBEDTLS_RIPEMD160_H
13
14#include "mbedtls/build_info.h"
15
16#include <stddef.h>
17#include <stdint.h>
18
19#ifdef __cplusplus
20extern "C" {
21#endif
22
23#if !defined(MBEDTLS_RIPEMD160_ALT)
24// Regular implementation
25//
26
31 uint32_t MBEDTLS_PRIVATE(total)[2];
32 uint32_t MBEDTLS_PRIVATE(state)[5];
33 unsigned char MBEDTLS_PRIVATE(buffer)[64];
34}
36
37#else /* MBEDTLS_RIPEMD160_ALT */
38#include "ripemd160_alt.h"
39#endif /* MBEDTLS_RIPEMD160_ALT */
40
47
54
62 const mbedtls_ripemd160_context *src);
63
72
83 const unsigned char *input,
84 size_t ilen);
85
95 unsigned char output[20]);
96
106 const unsigned char data[64]);
107
117int mbedtls_ripemd160(const unsigned char *input,
118 size_t ilen,
119 unsigned char output[20]);
120
121#if defined(MBEDTLS_SELF_TEST)
122
129
130#endif /* MBEDTLS_SELF_TEST */
131
132#ifdef __cplusplus
133}
134#endif
135
136#endif /* mbedtls_ripemd160.h */
Build-time configuration info.
Macro wrapper for struct's members.
#define MBEDTLS_PRIVATE(member)
int mbedtls_ripemd160_starts(mbedtls_ripemd160_context *ctx)
RIPEMD-160 context setup.
int mbedtls_ripemd160_update(mbedtls_ripemd160_context *ctx, const unsigned char *input, size_t ilen)
RIPEMD-160 process buffer.
int mbedtls_ripemd160_self_test(int verbose)
Checkup routine.
void mbedtls_ripemd160_clone(mbedtls_ripemd160_context *dst, const mbedtls_ripemd160_context *src)
Clone (the state of) a RIPEMD-160 context.
void mbedtls_ripemd160_init(mbedtls_ripemd160_context *ctx)
Initialize RIPEMD-160 context.
int mbedtls_internal_ripemd160_process(mbedtls_ripemd160_context *ctx, const unsigned char data[64])
RIPEMD-160 process data block (internal use only)
struct mbedtls_ripemd160_context mbedtls_ripemd160_context
RIPEMD-160 context structure.
void mbedtls_ripemd160_free(mbedtls_ripemd160_context *ctx)
Clear RIPEMD-160 context.
int mbedtls_ripemd160(const unsigned char *input, size_t ilen, unsigned char output[20])
Output = RIPEMD-160( input buffer )
int mbedtls_ripemd160_finish(mbedtls_ripemd160_context *ctx, unsigned char output[20])
RIPEMD-160 final digest.
RIPEMD-160 context structure.
Definition: ripemd160.h:30