mbed TLS v2.7.6
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 #define MBEDTLS_ERR_RIPEMD160_HW_ACCEL_FAILED -0x0031
38 #if !defined(MBEDTLS_RIPEMD160_ALT)
39 // Regular implementation
40 //
41 
42 #ifdef __cplusplus
43 extern "C" {
44 #endif
45 
49 typedef struct
50 {
51  uint32_t total[2];
52  uint32_t state[5];
53  unsigned char buffer[64];
54 }
56 
63 
70 
78  const mbedtls_ripemd160_context *src );
79 
88 
99  const unsigned char *input,
100  size_t ilen );
101 
111  unsigned char output[20] );
112 
122  const unsigned char data[64] );
123 
124 #if !defined(MBEDTLS_DEPRECATED_REMOVED)
125 #if defined(MBEDTLS_DEPRECATED_WARNING)
126 #define MBEDTLS_DEPRECATED __attribute__((deprecated))
127 #else
128 #define MBEDTLS_DEPRECATED
129 #endif
130 
139 
151  const unsigned char *input,
152  size_t ilen );
153 
164  unsigned char output[20] );
165 
176  const unsigned char data[64] );
177 
178 #undef MBEDTLS_DEPRECATED
179 #endif /* !MBEDTLS_DEPRECATED_REMOVED */
180 
181 #ifdef __cplusplus
182 }
183 #endif
184 
185 #else /* MBEDTLS_RIPEMD160_ALT */
186 #include "ripemd160_alt.h"
187 #endif /* MBEDTLS_RIPEMD160_ALT */
188 
189 #ifdef __cplusplus
190 extern "C" {
191 #endif
192 
202 int mbedtls_ripemd160_ret( const unsigned char *input,
203  size_t ilen,
204  unsigned char output[20] );
205 
206 #if !defined(MBEDTLS_DEPRECATED_REMOVED)
207 #if defined(MBEDTLS_DEPRECATED_WARNING)
208 #define MBEDTLS_DEPRECATED __attribute__((deprecated))
209 #else
210 #define MBEDTLS_DEPRECATED
211 #endif
212 
221 MBEDTLS_DEPRECATED void mbedtls_ripemd160( const unsigned char *input,
222  size_t ilen,
223  unsigned char output[20] );
224 
225 #undef MBEDTLS_DEPRECATED
226 #endif /* !MBEDTLS_DEPRECATED_REMOVED */
227 
233 int mbedtls_ripemd160_self_test( int verbose );
234 
235 #ifdef __cplusplus
236 }
237 #endif
238 
239 #endif /* mbedtls_ripemd160.h */
int mbedtls_ripemd160_self_test(int verbose)
Checkup routine.
int mbedtls_ripemd160_ret(const unsigned char *input, size_t ilen, unsigned char output[20])
Output = RIPEMD-160( input buffer )
MBEDTLS_DEPRECATED void mbedtls_ripemd160_starts(mbedtls_ripemd160_context *ctx)
RIPEMD-160 context setup.
Configuration options (set of defines)
MBEDTLS_DEPRECATED void mbedtls_ripemd160_finish(mbedtls_ripemd160_context *ctx, unsigned char output[20])
RIPEMD-160 final digest.
int mbedtls_ripemd160_update_ret(mbedtls_ripemd160_context *ctx, const unsigned char *input, size_t ilen)
RIPEMD-160 process buffer.
void mbedtls_ripemd160_free(mbedtls_ripemd160_context *ctx)
Clear 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)
#define MBEDTLS_DEPRECATED
Definition: ripemd160.h:210
int mbedtls_ripemd160_finish_ret(mbedtls_ripemd160_context *ctx, unsigned char output[20])
RIPEMD-160 final digest.
RIPEMD-160 context structure.
Definition: ripemd160.h:49
void mbedtls_ripemd160_clone(mbedtls_ripemd160_context *dst, const mbedtls_ripemd160_context *src)
Clone (the state of) an RIPEMD-160 context.
MBEDTLS_DEPRECATED void mbedtls_ripemd160_process(mbedtls_ripemd160_context *ctx, const unsigned char data[64])
RIPEMD-160 process data block (internal use only)
void mbedtls_ripemd160_init(mbedtls_ripemd160_context *ctx)
Initialize RIPEMD-160 context.
int mbedtls_ripemd160_starts_ret(mbedtls_ripemd160_context *ctx)
RIPEMD-160 context setup.
MBEDTLS_DEPRECATED void mbedtls_ripemd160_update(mbedtls_ripemd160_context *ctx, const unsigned char *input, size_t ilen)
RIPEMD-160 process buffer.
MBEDTLS_DEPRECATED void mbedtls_ripemd160(const unsigned char *input, size_t ilen, unsigned char output[20])
Output = RIPEMD-160( input buffer )