ReactOS  0.4.13-dev-235-g7373cb3
md5.h
Go to the documentation of this file.
1 
10 /*
11  * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved
12  * SPDX-License-Identifier: GPL-2.0
13  *
14  * This program is free software; you can redistribute it and/or modify
15  * it under the terms of the GNU General Public License as published by
16  * the Free Software Foundation; either version 2 of the License, or
17  * (at your option) any later version.
18  *
19  * This program is distributed in the hope that it will be useful,
20  * but WITHOUT ANY WARRANTY; without even the implied warranty of
21  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22  * GNU General Public License for more details.
23  *
24  * You should have received a copy of the GNU General Public License along
25  * with this program; if not, write to the Free Software Foundation, Inc.,
26  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
27  *
28  * This file is part of mbed TLS (https://tls.mbed.org)
29  */
30 #ifndef MBEDTLS_MD5_H
31 #define MBEDTLS_MD5_H
32 
33 #if !defined(MBEDTLS_CONFIG_FILE)
34 #include "config.h"
35 #else
36 #include MBEDTLS_CONFIG_FILE
37 #endif
38 
39 #include <stddef.h>
40 #include <stdint.h>
41 
42 #define MBEDTLS_ERR_MD5_HW_ACCEL_FAILED -0x002F
44 #if !defined(MBEDTLS_MD5_ALT)
45 // Regular implementation
46 //
47 
48 #ifdef __cplusplus
49 extern "C" {
50 #endif
51 
60 typedef struct
61 {
62  uint32_t total[2];
64  unsigned char buffer[64];
65 }
67 
79 
91 
104  const mbedtls_md5_context *src );
105 
119 
135  const unsigned char *input,
136  size_t ilen );
137 
152  unsigned char output[16] );
153 
168  const unsigned char data[64] );
169 
170 #if !defined(MBEDTLS_DEPRECATED_REMOVED)
171 #if defined(MBEDTLS_DEPRECATED_WARNING)
172 #define MBEDTLS_DEPRECATED __attribute__((deprecated))
173 #else
174 #define MBEDTLS_DEPRECATED
175 #endif
176 
189 
205  const unsigned char *input,
206  size_t ilen );
207 
222  unsigned char output[16] );
223 
238  const unsigned char data[64] );
239 
240 #undef MBEDTLS_DEPRECATED
241 #endif /* !MBEDTLS_DEPRECATED_REMOVED */
242 
243 #ifdef __cplusplus
244 }
245 #endif
246 
247 #else /* MBEDTLS_MD5_ALT */
248 #include "md5_alt.h"
249 #endif /* MBEDTLS_MD5_ALT */
250 
251 #ifdef __cplusplus
252 extern "C" {
253 #endif
254 
269 int mbedtls_md5_ret( const unsigned char *input,
270  size_t ilen,
271  unsigned char output[16] );
272 
273 #if !defined(MBEDTLS_DEPRECATED_REMOVED)
274 #if defined(MBEDTLS_DEPRECATED_WARNING)
275 #define MBEDTLS_DEPRECATED __attribute__((deprecated))
276 #else
277 #define MBEDTLS_DEPRECATED
278 #endif
279 
293 MBEDTLS_DEPRECATED void mbedtls_md5( const unsigned char *input,
294  size_t ilen,
295  unsigned char output[16] );
296 
297 #undef MBEDTLS_DEPRECATED
298 #endif /* !MBEDTLS_DEPRECATED_REMOVED */
299 
310 int mbedtls_md5_self_test( int verbose );
311 
312 #ifdef __cplusplus
313 }
314 #endif
315 
316 #endif /* mbedtls_md5.h */
int mbedtls_md5_ret(const unsigned char *input, size_t ilen, unsigned char output[16])
Output = MD5( input buffer )
static UCHAR ULONG UCHAR ULONG UCHAR * output
Definition: bcrypt.c:29
MBEDTLS_DEPRECATED void mbedtls_md5_finish(mbedtls_md5_context *ctx, unsigned char output[16])
MD5 final digest.
int mbedtls_md5_self_test(int verbose)
Checkup routine.
GLuint buffer
Definition: glext.h:5915
void mbedtls_md5_free(mbedtls_md5_context *ctx)
Clear MD5 context.
int mbedtls_md5_update_ret(mbedtls_md5_context *ctx, const unsigned char *input, size_t ilen)
MD5 process buffer.
#define verbose
Definition: rosglue.h:36
void mbedtls_md5_clone(mbedtls_md5_context *dst, const mbedtls_md5_context *src)
Clone (the state of) an MD5 context.
int mbedtls_md5_finish_ret(mbedtls_md5_context *ctx, unsigned char output[16])
MD5 final digest.
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
int mbedtls_internal_md5_process(mbedtls_md5_context *ctx, const unsigned char data[64])
MD5 process data block (internal use only)
MBEDTLS_DEPRECATED void mbedtls_md5(const unsigned char *input, size_t ilen, unsigned char output[16])
Output = MD5( input buffer )
MBEDTLS_DEPRECATED void mbedtls_md5_update(mbedtls_md5_context *ctx, const unsigned char *input, size_t ilen)
MD5 process buffer.
static int state
Definition: maze.c:121
MBEDTLS_DEPRECATED void mbedtls_md5_process(mbedtls_md5_context *ctx, const unsigned char data[64])
MD5 process data block (internal use only)
GLenum src
Definition: glext.h:6340
MBEDTLS_DEPRECATED void mbedtls_md5_starts(mbedtls_md5_context *ctx)
MD5 context setup.
GLenum GLenum GLenum input
Definition: glext.h:9031
MD5 context structure.
Definition: md5.h:60
#define MBEDTLS_DEPRECATED
Definition: md5.h:277
GLenum GLenum dst
Definition: glext.h:6340
UINT32 uint32_t
Definition: types.h:75
void mbedtls_md5_init(mbedtls_md5_context *ctx)
Initialize MD5 context.
int mbedtls_md5_starts_ret(mbedtls_md5_context *ctx)
MD5 context setup.