mbed TLS v2.16.0: ripemd160.h Source File

mbed TLS v2.16.0

ripemd160.h
Go to the documentation of this file.
1
6 /*
7 * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved
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 * This file is part of mbed TLS (https://tls.mbed.org)
23 */
24 #ifndef MBEDTLS_RIPEMD160_H
25 #define MBEDTLS_RIPEMD160_H
26
27 #if !defined(MBEDTLS_CONFIG_FILE)
28 #include "config.h"
29 #else
30 #include MBEDTLS_CONFIG_FILE
31 #endif
32
33 #include <stddef.h>
34 #include <stdint.h>
35
36 /* MBEDTLS_ERR_RIPEMD160_HW_ACCEL_FAILED is deprecated and should not be used.
37 */
38 #define MBEDTLS_ERR_RIPEMD160_HW_ACCEL_FAILED -0x0031
40 #ifdef __cplusplus
41 extern "C" {
42 #endif
43
44 #if !defined(MBEDTLS_RIPEMD160_ALT)
45 // Regular implementation
46 //
47
51 typedef struct mbedtls_ripemd160_context
52 {
53 uint32_t total[2];
54 uint32_t state[5];
55 unsigned char buffer[64];
56 }
57 mbedtls_ripemd160_context;
58
59 #else /* MBEDTLS_RIPEMD160_ALT */
60 #include "ripemd160.h"
61 #endif /* MBEDTLS_RIPEMD160_ALT */
62
68 void mbedtls_ripemd160_init( mbedtls_ripemd160_context *ctx );
69
75 void mbedtls_ripemd160_free( mbedtls_ripemd160_context *ctx );
76
83 void mbedtls_ripemd160_clone( mbedtls_ripemd160_context *dst,
84 const mbedtls_ripemd160_context *src );
85
93 int mbedtls_ripemd160_starts_ret( mbedtls_ripemd160_context *ctx );
94
104 int mbedtls_ripemd160_update_ret( mbedtls_ripemd160_context *ctx,
105 const unsigned char *input,
106 size_t ilen );
107
116 int mbedtls_ripemd160_finish_ret( mbedtls_ripemd160_context *ctx,
117 unsigned char output[20] );
118
127 int mbedtls_internal_ripemd160_process( mbedtls_ripemd160_context *ctx,
128 const unsigned char data[64] );
129
130 #if !defined(MBEDTLS_DEPRECATED_REMOVED)
131 #if defined(MBEDTLS_DEPRECATED_WARNING)
132 #define MBEDTLS_DEPRECATED __attribute__((deprecated))
133 #else
134 #define MBEDTLS_DEPRECATED
135 #endif
136
143 MBEDTLS_DEPRECATED void mbedtls_ripemd160_starts(
144 mbedtls_ripemd160_context *ctx );
145
155 MBEDTLS_DEPRECATED void mbedtls_ripemd160_update(
156 mbedtls_ripemd160_context *ctx,
157 const unsigned char *input,
158 size_t ilen );
159
168 MBEDTLS_DEPRECATED void mbedtls_ripemd160_finish(
169 mbedtls_ripemd160_context *ctx,
170 unsigned char output[20] );
171
180 MBEDTLS_DEPRECATED void mbedtls_ripemd160_process(
181 mbedtls_ripemd160_context *ctx,
182 const unsigned char data[64] );
183
184 #undef MBEDTLS_DEPRECATED
185 #endif /* !MBEDTLS_DEPRECATED_REMOVED */
186
196 int mbedtls_ripemd160_ret( const unsigned char *input,
197 size_t ilen,
198 unsigned char output[20] );
199
200 #if !defined(MBEDTLS_DEPRECATED_REMOVED)
201 #if defined(MBEDTLS_DEPRECATED_WARNING)
202 #define MBEDTLS_DEPRECATED __attribute__((deprecated))
203 #else
204 #define MBEDTLS_DEPRECATED
205 #endif
206
215 MBEDTLS_DEPRECATED void mbedtls_ripemd160( const unsigned char *input,
216 size_t ilen,
217 unsigned char output[20] );
218
219 #undef MBEDTLS_DEPRECATED
220 #endif /* !MBEDTLS_DEPRECATED_REMOVED */
221
227 int mbedtls_ripemd160_self_test( int verbose );
228
229 #ifdef __cplusplus
230 }
231 #endif
232
233 #endif /* mbedtls_ripemd160.h */
mbedtls_ripemd160_self_test
int mbedtls_ripemd160_self_test(int verbose)
Checkup routine.
mbedtls_ripemd160_context::state
uint32_t state[5]
Definition: ripemd160.h:54
mbedtls_ripemd160_ret
int mbedtls_ripemd160_ret(const unsigned char *input, size_t ilen, unsigned char output[20])
Output = RIPEMD-160( input buffer )
mbedtls_ripemd160_starts
MBEDTLS_DEPRECATED void mbedtls_ripemd160_starts(mbedtls_ripemd160_context *ctx)
RIPEMD-160 context setup.
config.h
Configuration options (set of defines)
mbedtls_ripemd160_finish
MBEDTLS_DEPRECATED void mbedtls_ripemd160_finish(mbedtls_ripemd160_context *ctx, unsigned char output[20])
RIPEMD-160 final digest.
ripemd160.h
RIPE MD-160 message digest.
mbedtls_ripemd160_update_ret
int mbedtls_ripemd160_update_ret(mbedtls_ripemd160_context *ctx, const unsigned char *input, size_t ilen)
RIPEMD-160 process buffer.
mbedtls_ripemd160_free
void mbedtls_ripemd160_free(mbedtls_ripemd160_context *ctx)
Clear RIPEMD-160 context.
mbedtls_internal_ripemd160_process
int mbedtls_internal_ripemd160_process(mbedtls_ripemd160_context *ctx, const unsigned char data[64])
RIPEMD-160 process data block (internal use only)
mbedtls_ripemd160_context
struct mbedtls_ripemd160_context mbedtls_ripemd160_context
RIPEMD-160 context structure.
MBEDTLS_DEPRECATED
#define MBEDTLS_DEPRECATED
Definition: ripemd160.h:204
mbedtls_ripemd160_finish_ret
int mbedtls_ripemd160_finish_ret(mbedtls_ripemd160_context *ctx, unsigned char output[20])
RIPEMD-160 final digest.
mbedtls_ripemd160_context::total
uint32_t total[2]
Definition: ripemd160.h:53
mbedtls_ripemd160_context
RIPEMD-160 context structure.
Definition: ripemd160.h:51
mbedtls_ripemd160_context::buffer
unsigned char buffer[64]
Definition: ripemd160.h:55
mbedtls_ripemd160_clone
void mbedtls_ripemd160_clone(mbedtls_ripemd160_context *dst, const mbedtls_ripemd160_context *src)
Clone (the state of) an RIPEMD-160 context.
mbedtls_ripemd160_process
MBEDTLS_DEPRECATED void mbedtls_ripemd160_process(mbedtls_ripemd160_context *ctx, const unsigned char data[64])
RIPEMD-160 process data block (internal use only)
mbedtls_ripemd160_init
void mbedtls_ripemd160_init(mbedtls_ripemd160_context *ctx)
Initialize RIPEMD-160 context.
mbedtls_ripemd160_starts_ret
int mbedtls_ripemd160_starts_ret(mbedtls_ripemd160_context *ctx)
RIPEMD-160 context setup.
mbedtls_ripemd160_update
MBEDTLS_DEPRECATED void mbedtls_ripemd160_update(mbedtls_ripemd160_context *ctx, const unsigned char *input, size_t ilen)
RIPEMD-160 process buffer.
mbedtls_ripemd160
MBEDTLS_DEPRECATED void mbedtls_ripemd160(const unsigned char *input, size_t ilen, unsigned char output[20])
Output = RIPEMD-160( input buffer )