mbed TLS v2.28.1
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
24 
25 #if !defined(MBEDTLS_CONFIG_FILE)
26 #include "mbedtls/config.h"
27 #else
28 #include MBEDTLS_CONFIG_FILE
29 #endif
30 
31 #include <stddef.h>
32 #include <stdint.h>
33 
34 /* MBEDTLS_ERR_RIPEMD160_HW_ACCEL_FAILED is deprecated and should not be used.
35  */
37 #define MBEDTLS_ERR_RIPEMD160_HW_ACCEL_FAILED -0x0031
38 
39 #ifdef __cplusplus
40 extern "C" {
41 #endif
42 
43 #if !defined(MBEDTLS_RIPEMD160_ALT)
44 // Regular implementation
45 //
46 
51 {
52  uint32_t total[2];
53  uint32_t state[5];
54  unsigned char buffer[64];
55 }
57 
58 #else /* MBEDTLS_RIPEMD160_ALT */
59 #include "ripemd160_alt.h"
60 #endif /* MBEDTLS_RIPEMD160_ALT */
61 
68 
75 
83  const mbedtls_ripemd160_context *src );
84 
93 
104  const unsigned char *input,
105  size_t ilen );
106 
116  unsigned char output[20] );
117 
127  const unsigned char data[64] );
128 
129 #if !defined(MBEDTLS_DEPRECATED_REMOVED)
130 #if defined(MBEDTLS_DEPRECATED_WARNING)
131 #define MBEDTLS_DEPRECATED __attribute__((deprecated))
132 #else
133 #define MBEDTLS_DEPRECATED
134 #endif
144 
156  const unsigned char *input,
157  size_t ilen );
158 
169  unsigned char output[20] );
170 
181  const unsigned char data[64] );
182 
183 #undef MBEDTLS_DEPRECATED
184 #endif /* !MBEDTLS_DEPRECATED_REMOVED */
185 
195 int mbedtls_ripemd160_ret( const unsigned char *input,
196  size_t ilen,
197  unsigned char output[20] );
198 
199 #if !defined(MBEDTLS_DEPRECATED_REMOVED)
200 #if defined(MBEDTLS_DEPRECATED_WARNING)
201 #define MBEDTLS_DEPRECATED __attribute__((deprecated))
202 #else
203 #define MBEDTLS_DEPRECATED
204 #endif
214 MBEDTLS_DEPRECATED void mbedtls_ripemd160( const unsigned char *input,
215  size_t ilen,
216  unsigned char output[20] );
217 
218 #undef MBEDTLS_DEPRECATED
219 #endif /* !MBEDTLS_DEPRECATED_REMOVED */
220 
221 #if defined(MBEDTLS_SELF_TEST)
222 
228 int mbedtls_ripemd160_self_test( int verbose );
229 
230 #endif /* MBEDTLS_SELF_TEST */
231 
232 #ifdef __cplusplus
233 }
234 #endif
235 
236 #endif /* mbedtls_ripemd160.h */
Configuration options (set of defines)
MBEDTLS_DEPRECATED void mbedtls_ripemd160(const unsigned char *input, size_t ilen, unsigned char output[20])
Output = RIPEMD-160( input buffer )
MBEDTLS_DEPRECATED void mbedtls_ripemd160_process(mbedtls_ripemd160_context *ctx, const unsigned char data[64])
RIPEMD-160 process data block (internal use only)
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) an 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.
MBEDTLS_DEPRECATED void mbedtls_ripemd160_starts(mbedtls_ripemd160_context *ctx)
RIPEMD-160 context setup.
int mbedtls_ripemd160_update_ret(mbedtls_ripemd160_context *ctx, const unsigned char *input, size_t ilen)
RIPEMD-160 process buffer.
int mbedtls_ripemd160_ret(const unsigned char *input, size_t ilen, unsigned char output[20])
Output = RIPEMD-160( input buffer )
int mbedtls_ripemd160_finish_ret(mbedtls_ripemd160_context *ctx, unsigned char output[20])
RIPEMD-160 final digest.
MBEDTLS_DEPRECATED void mbedtls_ripemd160_finish(mbedtls_ripemd160_context *ctx, unsigned char output[20])
RIPEMD-160 final digest.
#define MBEDTLS_DEPRECATED
Definition: ripemd160.h:201
MBEDTLS_DEPRECATED void mbedtls_ripemd160_update(mbedtls_ripemd160_context *ctx, const unsigned char *input, size_t ilen)
RIPEMD-160 process buffer.
int mbedtls_ripemd160_starts_ret(mbedtls_ripemd160_context *ctx)
RIPEMD-160 context setup.
RIPEMD-160 context structure.
Definition: ripemd160.h:51
unsigned char buffer[64]
Definition: ripemd160.h:54