mbed TLS v3.3.0
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
9 *
10 * Licensed under the Apache License, Version 2.0 (the "License"); you may
11 * not use this file except in compliance with the License.
12 * You may obtain a copy of the License at
13 *
14 * http://www.apache.org/licenses/LICENSE-2.0
15 *
16 * Unless required by applicable law or agreed to in writing, software
17 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
18 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19 * See the License for the specific language governing permissions and
20 * limitations under the License.
21 */
22#ifndef MBEDTLS_RIPEMD160_H
23#define MBEDTLS_RIPEMD160_H
25
26#include "mbedtls/build_info.h"
27
28#include <stddef.h>
29#include <stdint.h>
30
31#ifdef __cplusplus
32extern "C" {
33#endif
34
35#if !defined(MBEDTLS_RIPEMD160_ALT)
36// Regular implementation
37//
38
43{
44 uint32_t MBEDTLS_PRIVATE(total)[2];
45 uint32_t MBEDTLS_PRIVATE(state)[5];
46 unsigned char MBEDTLS_PRIVATE(buffer)[64];
47}
49
50#else /* MBEDTLS_RIPEMD160_ALT */
51#include "ripemd160_alt.h"
52#endif /* MBEDTLS_RIPEMD160_ALT */
53
60
67
75 const mbedtls_ripemd160_context *src );
76
85
96 const unsigned char *input,
97 size_t ilen );
98
108 unsigned char output[20] );
109
119 const unsigned char data[64] );
120
130int mbedtls_ripemd160( const unsigned char *input,
131 size_t ilen,
132 unsigned char output[20] );
133
134#if defined(MBEDTLS_SELF_TEST)
135
142
143#endif /* MBEDTLS_SELF_TEST */
144
145#ifdef __cplusplus
146}
147#endif
148
149#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)
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:43