ReactOS  0.4.15-dev-3287-gfec35dc
md2.h
Go to the documentation of this file.
1 
10 /*
11  * Copyright The Mbed TLS Contributors
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  */
54 #ifndef MBEDTLS_MD2_H
55 #define MBEDTLS_MD2_H
56 
57 #if !defined(MBEDTLS_CONFIG_FILE)
58 #include "config.h"
59 #else
60 #include MBEDTLS_CONFIG_FILE
61 #endif
62 
63 #include <stddef.h>
64 
65 /* MBEDTLS_ERR_MD2_HW_ACCEL_FAILED is deprecated and should not be used. */
66 #define MBEDTLS_ERR_MD2_HW_ACCEL_FAILED -0x002B
68 #ifdef __cplusplus
69 extern "C" {
70 #endif
71 
72 #if !defined(MBEDTLS_MD2_ALT)
73 // Regular implementation
74 //
75 
84 typedef struct mbedtls_md2_context
85 {
86  unsigned char cksum[16];
87  unsigned char state[48];
88  unsigned char buffer[16];
89  size_t left;
90 }
92 
93 #else /* MBEDTLS_MD2_ALT */
94 #include "md2_alt.h"
95 #endif /* MBEDTLS_MD2_ALT */
96 
108 
120 
133  const mbedtls_md2_context *src );
134 
148 
164  const unsigned char *input,
165  size_t ilen );
166 
181  unsigned char output[16] );
182 
196 
197 #if !defined(MBEDTLS_DEPRECATED_REMOVED)
198 #if defined(MBEDTLS_DEPRECATED_WARNING)
199 #define MBEDTLS_DEPRECATED __attribute__((deprecated))
200 #else
201 #define MBEDTLS_DEPRECATED
202 #endif
203 
216 
232  const unsigned char *input,
233  size_t ilen );
234 
249  unsigned char output[16] );
250 
264 
265 #undef MBEDTLS_DEPRECATED
266 #endif /* !MBEDTLS_DEPRECATED_REMOVED */
267 
280 int mbedtls_md2_ret( const unsigned char *input,
281  size_t ilen,
282  unsigned char output[16] );
283 
284 #if !defined(MBEDTLS_DEPRECATED_REMOVED)
285 #if defined(MBEDTLS_DEPRECATED_WARNING)
286 #define MBEDTLS_DEPRECATED __attribute__((deprecated))
287 #else
288 #define MBEDTLS_DEPRECATED
289 #endif
290 
304 MBEDTLS_DEPRECATED void mbedtls_md2( const unsigned char *input,
305  size_t ilen,
306  unsigned char output[16] );
307 
308 #undef MBEDTLS_DEPRECATED
309 #endif /* !MBEDTLS_DEPRECATED_REMOVED */
310 
311 #if defined(MBEDTLS_SELF_TEST)
312 
323 int mbedtls_md2_self_test( int verbose );
324 
325 #endif /* MBEDTLS_SELF_TEST */
326 
327 #ifdef __cplusplus
328 }
329 #endif
330 
331 #endif /* mbedtls_md2.h */
MBEDTLS_DEPRECATED void mbedtls_md2(const unsigned char *input, size_t ilen, unsigned char output[16])
Output = MD2( input buffer )
static UCHAR ULONG UCHAR ULONG UCHAR * output
Definition: bcrypt.c:29
size_t left
Definition: md2.h:89
MBEDTLS_DEPRECATED void mbedtls_md2_starts(mbedtls_md2_context *ctx)
MD2 context setup.
unsigned char cksum[16]
Definition: md2.h:86
GLuint buffer
Definition: glext.h:5915
int mbedtls_md2_update_ret(mbedtls_md2_context *ctx, const unsigned char *input, size_t ilen)
MD2 process buffer.
MBEDTLS_DEPRECATED void mbedtls_md2_update(mbedtls_md2_context *ctx, const unsigned char *input, size_t ilen)
MD2 process buffer.
#define verbose
Definition: rosglue.h:36
void mbedtls_md2_init(mbedtls_md2_context *ctx)
Initialize MD2 context.
MBEDTLS_DEPRECATED void mbedtls_md2_finish(mbedtls_md2_context *ctx, unsigned char output[16])
MD2 final digest.
int mbedtls_internal_md2_process(mbedtls_md2_context *ctx)
MD2 process data block (internal use only)
int mbedtls_md2_ret(const unsigned char *input, size_t ilen, unsigned char output[16])
Output = MD2( input buffer )
void mbedtls_md2_clone(mbedtls_md2_context *dst, const mbedtls_md2_context *src)
Clone (the state of) an MD2 context.
struct mbedtls_md2_context mbedtls_md2_context
MD2 context structure.
GLenum src
Definition: glext.h:6340
int mbedtls_md2_finish_ret(mbedtls_md2_context *ctx, unsigned char output[16])
MD2 final digest.
GLenum GLenum GLenum input
Definition: glext.h:9031
unsigned char state[48]
Definition: md2.h:87
GLenum GLenum dst
Definition: glext.h:6340
int mbedtls_md2_starts_ret(mbedtls_md2_context *ctx)
MD2 context setup.
#define MBEDTLS_DEPRECATED
Definition: md2.h:288
MD2 context structure.
Definition: md2.h:84
MBEDTLS_DEPRECATED void mbedtls_md2_process(mbedtls_md2_context *ctx)
MD2 process data block (internal use only)
void mbedtls_md2_free(mbedtls_md2_context *ctx)
Clear MD2 context.