ReactOS  0.4.15-dev-1206-g731eddf
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: Apache-2.0 OR GPL-2.0-or-later
13  *
14  * This file is provided under the Apache License 2.0, or the
15  * GNU General Public License v2.0 or later.
16  *
17  * **********
18  * Apache License 2.0:
19  *
20  * Licensed under the Apache License, Version 2.0 (the "License"); you may
21  * not use this file except in compliance with the License.
22  * You may obtain a copy of the License at
23  *
24  * http://www.apache.org/licenses/LICENSE-2.0
25  *
26  * Unless required by applicable law or agreed to in writing, software
27  * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
28  * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
29  * See the License for the specific language governing permissions and
30  * limitations under the License.
31  *
32  * **********
33  *
34  * **********
35  * GNU General Public License v2.0 or later:
36  *
37  * This program is free software; you can redistribute it and/or modify
38  * it under the terms of the GNU General Public License as published by
39  * the Free Software Foundation; either version 2 of the License, or
40  * (at your option) any later version.
41  *
42  * This program is distributed in the hope that it will be useful,
43  * but WITHOUT ANY WARRANTY; without even the implied warranty of
44  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
45  * GNU General Public License for more details.
46  *
47  * You should have received a copy of the GNU General Public License along
48  * with this program; if not, write to the Free Software Foundation, Inc.,
49  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
50  *
51  * **********
52  *
53  * This file is part of mbed TLS (https://tls.mbed.org)
54  */
55 #ifndef MBEDTLS_MD5_H
56 #define MBEDTLS_MD5_H
57 
58 #if !defined(MBEDTLS_CONFIG_FILE)
59 #include "config.h"
60 #else
61 #include MBEDTLS_CONFIG_FILE
62 #endif
63 
64 #include <stddef.h>
65 #include <stdint.h>
66 
67 #define MBEDTLS_ERR_MD5_HW_ACCEL_FAILED -0x002F
69 #if !defined(MBEDTLS_MD5_ALT)
70 // Regular implementation
71 //
72 
73 #ifdef __cplusplus
74 extern "C" {
75 #endif
76 
85 typedef struct
86 {
87  uint32_t total[2];
89  unsigned char buffer[64];
90 }
92 
104 
116 
129  const mbedtls_md5_context *src );
130 
144 
160  const unsigned char *input,
161  size_t ilen );
162 
177  unsigned char output[16] );
178 
193  const unsigned char data[64] );
194 
195 #if !defined(MBEDTLS_DEPRECATED_REMOVED)
196 #if defined(MBEDTLS_DEPRECATED_WARNING)
197 #define MBEDTLS_DEPRECATED __attribute__((deprecated))
198 #else
199 #define MBEDTLS_DEPRECATED
200 #endif
201 
214 
230  const unsigned char *input,
231  size_t ilen );
232 
247  unsigned char output[16] );
248 
263  const unsigned char data[64] );
264 
265 #undef MBEDTLS_DEPRECATED
266 #endif /* !MBEDTLS_DEPRECATED_REMOVED */
267 
268 #ifdef __cplusplus
269 }
270 #endif
271 
272 #else /* MBEDTLS_MD5_ALT */
273 #include "md5_alt.h"
274 #endif /* MBEDTLS_MD5_ALT */
275 
276 #ifdef __cplusplus
277 extern "C" {
278 #endif
279 
294 int mbedtls_md5_ret( const unsigned char *input,
295  size_t ilen,
296  unsigned char output[16] );
297 
298 #if !defined(MBEDTLS_DEPRECATED_REMOVED)
299 #if defined(MBEDTLS_DEPRECATED_WARNING)
300 #define MBEDTLS_DEPRECATED __attribute__((deprecated))
301 #else
302 #define MBEDTLS_DEPRECATED
303 #endif
304 
318 MBEDTLS_DEPRECATED void mbedtls_md5( const unsigned char *input,
319  size_t ilen,
320  unsigned char output[16] );
321 
322 #undef MBEDTLS_DEPRECATED
323 #endif /* !MBEDTLS_DEPRECATED_REMOVED */
324 
335 int mbedtls_md5_self_test( int verbose );
336 
337 #ifdef __cplusplus
338 }
339 #endif
340 
341 #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:85
#define MBEDTLS_DEPRECATED
Definition: md5.h:302
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.