Mbed TLS v2.28.8
Loading...
Searching...
No Matches
md5.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#ifndef MBEDTLS_MD5_H
15#define MBEDTLS_MD5_H
16
17#if !defined(MBEDTLS_CONFIG_FILE)
18#include "mbedtls/config.h"
19#else
20#include MBEDTLS_CONFIG_FILE
21#endif
22
23#include <stddef.h>
24#include <stdint.h>
25
26/* MBEDTLS_ERR_MD5_HW_ACCEL_FAILED is deprecated and should not be used. */
28#define MBEDTLS_ERR_MD5_HW_ACCEL_FAILED -0x002F
29
30#ifdef __cplusplus
31extern "C" {
32#endif
33
34#if !defined(MBEDTLS_MD5_ALT)
35// Regular implementation
36//
37
46typedef struct mbedtls_md5_context {
47 uint32_t total[2];
48 uint32_t state[4];
49 unsigned char buffer[64];
50}
52
53#else /* MBEDTLS_MD5_ALT */
54#include "md5_alt.h"
55#endif /* MBEDTLS_MD5_ALT */
56
68
80
93 const mbedtls_md5_context *src);
94
108
124 const unsigned char *input,
125 size_t ilen);
126
141 unsigned char output[16]);
142
157 const unsigned char data[64]);
158
159#if !defined(MBEDTLS_DEPRECATED_REMOVED)
160#if defined(MBEDTLS_DEPRECATED_WARNING)
161#define MBEDTLS_DEPRECATED __attribute__((deprecated))
162#else
163#define MBEDTLS_DEPRECATED
164#endif
178
194 const unsigned char *input,
195 size_t ilen);
196
211 unsigned char output[16]);
212
227 const unsigned char data[64]);
228
229#undef MBEDTLS_DEPRECATED
230#endif /* !MBEDTLS_DEPRECATED_REMOVED */
231
246int mbedtls_md5_ret(const unsigned char *input,
247 size_t ilen,
248 unsigned char output[16]);
249
250#if !defined(MBEDTLS_DEPRECATED_REMOVED)
251#if defined(MBEDTLS_DEPRECATED_WARNING)
252#define MBEDTLS_DEPRECATED __attribute__((deprecated))
253#else
254#define MBEDTLS_DEPRECATED
255#endif
270MBEDTLS_DEPRECATED void mbedtls_md5(const unsigned char *input,
271 size_t ilen,
272 unsigned char output[16]);
273
274#undef MBEDTLS_DEPRECATED
275#endif /* !MBEDTLS_DEPRECATED_REMOVED */
276
277#if defined(MBEDTLS_SELF_TEST)
278
289int mbedtls_md5_self_test(int verbose);
290
291#endif /* MBEDTLS_SELF_TEST */
292
293#ifdef __cplusplus
294}
295#endif
296
297#endif /* mbedtls_md5.h */
Configuration options (set of defines)
struct mbedtls_md5_context mbedtls_md5_context
MD5 context structure.
void mbedtls_md5_clone(mbedtls_md5_context *dst, const mbedtls_md5_context *src)
Clone (the state of) an MD5 context.
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 )
int mbedtls_md5_self_test(int verbose)
Checkup routine.
void mbedtls_md5_free(mbedtls_md5_context *ctx)
Clear MD5 context.
MBEDTLS_DEPRECATED void mbedtls_md5_process(mbedtls_md5_context *ctx, const unsigned char data[64])
MD5 process data block (internal use only)
MBEDTLS_DEPRECATED void mbedtls_md5_starts(mbedtls_md5_context *ctx)
MD5 context setup.
int mbedtls_md5_ret(const unsigned char *input, size_t ilen, unsigned char output[16])
Output = MD5( input buffer )
#define MBEDTLS_DEPRECATED
Definition md5.h:163
int mbedtls_md5_starts_ret(mbedtls_md5_context *ctx)
MD5 context setup.
MBEDTLS_DEPRECATED void mbedtls_md5_finish(mbedtls_md5_context *ctx, unsigned char output[16])
MD5 final digest.
void mbedtls_md5_init(mbedtls_md5_context *ctx)
Initialize MD5 context.
int mbedtls_md5_update_ret(mbedtls_md5_context *ctx, const unsigned char *input, size_t ilen)
MD5 process buffer.
int mbedtls_md5_finish_ret(mbedtls_md5_context *ctx, unsigned char output[16])
MD5 final digest.
MBEDTLS_DEPRECATED void mbedtls_md5_update(mbedtls_md5_context *ctx, const unsigned char *input, size_t ilen)
MD5 process buffer.
MD5 context structure.
Definition md5.h:46
uint32_t state[4]
Definition md5.h:48
unsigned char buffer[64]
Definition md5.h:49
uint32_t total[2]
Definition md5.h:47