mbed TLS v2.16.1
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: GPL-2.0
9  *
10  * This program is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation; either version 2 of the License, or
13  * (at your option) any later version.
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  * GNU General Public License for more details.
19  *
20  * You should have received a copy of the GNU General Public License along
21  * with this program; if not, write to the Free Software Foundation, Inc.,
22  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
23  *
24  * This file is part of mbed TLS (https://tls.mbed.org)
25  */
26 #ifndef MBEDTLS_RIPEMD160_H
27 #define MBEDTLS_RIPEMD160_H
28 
29 #if !defined(MBEDTLS_CONFIG_FILE)
30 #include "config.h"
31 #else
32 #include MBEDTLS_CONFIG_FILE
33 #endif
34 
35 #include <stddef.h>
36 #include <stdint.h>
37 
38 /* MBEDTLS_ERR_RIPEMD160_HW_ACCEL_FAILED is deprecated and should not be used.
39  */
40 #define MBEDTLS_ERR_RIPEMD160_HW_ACCEL_FAILED -0x0031
42 #ifdef __cplusplus
43 extern "C" {
44 #endif
45 
46 #if !defined(MBEDTLS_RIPEMD160_ALT)
47 // Regular implementation
48 //
49 
54 {
55  uint32_t total[2];
56  uint32_t state[5];
57  unsigned char buffer[64];
58 }
60 
61 #else /* MBEDTLS_RIPEMD160_ALT */
62 #include "ripemd160.h"
63 #endif /* MBEDTLS_RIPEMD160_ALT */
64 
71 
78 
86  const mbedtls_ripemd160_context *src );
87 
96 
107  const unsigned char *input,
108  size_t ilen );
109 
119  unsigned char output[20] );
120 
130  const unsigned char data[64] );
131 
132 #if !defined(MBEDTLS_DEPRECATED_REMOVED)
133 #if defined(MBEDTLS_DEPRECATED_WARNING)
134 #define MBEDTLS_DEPRECATED __attribute__((deprecated))
135 #else
136 #define MBEDTLS_DEPRECATED
137 #endif
138 
147 
159  const unsigned char *input,
160  size_t ilen );
161 
172  unsigned char output[20] );
173 
184  const unsigned char data[64] );
185 
186 #undef MBEDTLS_DEPRECATED
187 #endif /* !MBEDTLS_DEPRECATED_REMOVED */
188 
198 int mbedtls_ripemd160_ret( const unsigned char *input,
199  size_t ilen,
200  unsigned char output[20] );
201 
202 #if !defined(MBEDTLS_DEPRECATED_REMOVED)
203 #if defined(MBEDTLS_DEPRECATED_WARNING)
204 #define MBEDTLS_DEPRECATED __attribute__((deprecated))
205 #else
206 #define MBEDTLS_DEPRECATED
207 #endif
208 
217 MBEDTLS_DEPRECATED void mbedtls_ripemd160( const unsigned char *input,
218  size_t ilen,
219  unsigned char output[20] );
220 
221 #undef MBEDTLS_DEPRECATED
222 #endif /* !MBEDTLS_DEPRECATED_REMOVED */
223 
224 #if defined(MBEDTLS_SELF_TEST)
225 
231 int mbedtls_ripemd160_self_test( int verbose );
232 
233 #endif /* MBEDTLS_SELF_TEST */
234 
235 #ifdef __cplusplus
236 }
237 #endif
238 
239 #endif /* mbedtls_ripemd160.h */