mbed TLS v2.16.7
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 OR GPL-2.0-or-later
9  *
10  * This file is provided under the Apache License 2.0, or the
11  * GNU General Public License v2.0 or later.
12  *
13  * **********
14  * Apache License 2.0:
15  *
16  * Licensed under the Apache License, Version 2.0 (the "License"); you may
17  * not use this file except in compliance with the License.
18  * You may obtain a copy of the License at
19  *
20  * http://www.apache.org/licenses/LICENSE-2.0
21  *
22  * Unless required by applicable law or agreed to in writing, software
23  * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
24  * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
25  * See the License for the specific language governing permissions and
26  * limitations under the License.
27  *
28  * **********
29  *
30  * **********
31  * GNU General Public License v2.0 or later:
32  *
33  * This program is free software; you can redistribute it and/or modify
34  * it under the terms of the GNU General Public License as published by
35  * the Free Software Foundation; either version 2 of the License, or
36  * (at your option) any later version.
37  *
38  * This program is distributed in the hope that it will be useful,
39  * but WITHOUT ANY WARRANTY; without even the implied warranty of
40  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
41  * GNU General Public License for more details.
42  *
43  * You should have received a copy of the GNU General Public License along
44  * with this program; if not, write to the Free Software Foundation, Inc.,
45  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
46  *
47  * **********
48  *
49  * This file is part of mbed TLS (https://tls.mbed.org)
50  */
51 #ifndef MBEDTLS_RIPEMD160_H
52 #define MBEDTLS_RIPEMD160_H
53 
54 #if !defined(MBEDTLS_CONFIG_FILE)
55 #include "config.h"
56 #else
57 #include MBEDTLS_CONFIG_FILE
58 #endif
59 
60 #include <stddef.h>
61 #include <stdint.h>
62 
63 /* MBEDTLS_ERR_RIPEMD160_HW_ACCEL_FAILED is deprecated and should not be used.
64  */
65 #define MBEDTLS_ERR_RIPEMD160_HW_ACCEL_FAILED -0x0031
67 #ifdef __cplusplus
68 extern "C" {
69 #endif
70 
71 #if !defined(MBEDTLS_RIPEMD160_ALT)
72 // Regular implementation
73 //
74 
79 {
80  uint32_t total[2];
81  uint32_t state[5];
82  unsigned char buffer[64];
83 }
85 
86 #else /* MBEDTLS_RIPEMD160_ALT */
87 #include "ripemd160.h"
88 #endif /* MBEDTLS_RIPEMD160_ALT */
89 
96 
103 
111  const mbedtls_ripemd160_context *src );
112 
121 
132  const unsigned char *input,
133  size_t ilen );
134 
144  unsigned char output[20] );
145 
155  const unsigned char data[64] );
156 
157 #if !defined(MBEDTLS_DEPRECATED_REMOVED)
158 #if defined(MBEDTLS_DEPRECATED_WARNING)
159 #define MBEDTLS_DEPRECATED __attribute__((deprecated))
160 #else
161 #define MBEDTLS_DEPRECATED
162 #endif
163 
172 
184  const unsigned char *input,
185  size_t ilen );
186 
197  unsigned char output[20] );
198 
209  const unsigned char data[64] );
210 
211 #undef MBEDTLS_DEPRECATED
212 #endif /* !MBEDTLS_DEPRECATED_REMOVED */
213 
223 int mbedtls_ripemd160_ret( const unsigned char *input,
224  size_t ilen,
225  unsigned char output[20] );
226 
227 #if !defined(MBEDTLS_DEPRECATED_REMOVED)
228 #if defined(MBEDTLS_DEPRECATED_WARNING)
229 #define MBEDTLS_DEPRECATED __attribute__((deprecated))
230 #else
231 #define MBEDTLS_DEPRECATED
232 #endif
233 
242 MBEDTLS_DEPRECATED void mbedtls_ripemd160( const unsigned char *input,
243  size_t ilen,
244  unsigned char output[20] );
245 
246 #undef MBEDTLS_DEPRECATED
247 #endif /* !MBEDTLS_DEPRECATED_REMOVED */
248 
249 #if defined(MBEDTLS_SELF_TEST)
250 
256 int mbedtls_ripemd160_self_test( int verbose );
257 
258 #endif /* MBEDTLS_SELF_TEST */
259 
260 #ifdef __cplusplus
261 }
262 #endif
263 
264 #endif /* mbedtls_ripemd160.h */
mbedtls_ripemd160_self_test
int mbedtls_ripemd160_self_test(int verbose)
Checkup routine.
mbedtls_ripemd160_finish_ret
int mbedtls_ripemd160_finish_ret(mbedtls_ripemd160_context *ctx, unsigned char output[20])
RIPEMD-160 final digest.
mbedtls_ripemd160_finish
MBEDTLS_DEPRECATED void mbedtls_ripemd160_finish(mbedtls_ripemd160_context *ctx, unsigned char output[20])
RIPEMD-160 final digest.
mbedtls_ripemd160_context::buffer
unsigned char buffer[64]
Definition: ripemd160.h:82
mbedtls_ripemd160_free
void mbedtls_ripemd160_free(mbedtls_ripemd160_context *ctx)
Clear RIPEMD-160 context.
mbedtls_ripemd160_context
RIPEMD-160 context structure.
Definition: ripemd160.h:79
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_DEPRECATED
#define MBEDTLS_DEPRECATED
Definition: ripemd160.h:231
mbedtls_ripemd160_starts_ret
int mbedtls_ripemd160_starts_ret(mbedtls_ripemd160_context *ctx)
RIPEMD-160 context setup.
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_context::total
uint32_t total[2]
Definition: ripemd160.h:80
mbedtls_ripemd160_context::state
uint32_t state[5]
Definition: ripemd160.h:81
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_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_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_init
void mbedtls_ripemd160_init(mbedtls_ripemd160_context *ctx)
Initialize RIPEMD-160 context.
ripemd160.h
RIPE MD-160 message digest.
mbedtls_ripemd160
MBEDTLS_DEPRECATED void mbedtls_ripemd160(const unsigned char *input, size_t ilen, unsigned char output[20])
Output = RIPEMD-160( input buffer )
config.h
Configuration options (set of defines)
mbedtls_ripemd160_starts
MBEDTLS_DEPRECATED void mbedtls_ripemd160_starts(mbedtls_ripemd160_context *ctx)
RIPEMD-160 context setup.
mbedtls_ripemd160_ret
int mbedtls_ripemd160_ret(const unsigned char *input, size_t ilen, unsigned char output[20])
Output = RIPEMD-160( input buffer )