Mbed TLS v2.28.8
Loading...
Searching...
No Matches
md4.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 */
15#ifndef MBEDTLS_MD4_H
16#define MBEDTLS_MD4_H
17
18#if !defined(MBEDTLS_CONFIG_FILE)
19#include "mbedtls/config.h"
20#else
21#include MBEDTLS_CONFIG_FILE
22#endif
23
24#include <stddef.h>
25#include <stdint.h>
26
27/* MBEDTLS_ERR_MD4_HW_ACCEL_FAILED is deprecated and should not be used. */
29#define MBEDTLS_ERR_MD4_HW_ACCEL_FAILED -0x002D
30
31#ifdef __cplusplus
32extern "C" {
33#endif
34
35#if !defined(MBEDTLS_MD4_ALT)
36// Regular implementation
37//
38
47typedef struct mbedtls_md4_context {
48 uint32_t total[2];
49 uint32_t state[4];
50 unsigned char buffer[64];
51}
53
54#else /* MBEDTLS_MD4_ALT */
55#include "md4_alt.h"
56#endif /* MBEDTLS_MD4_ALT */
57
69
81
94 const mbedtls_md4_context *src);
95
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_md4_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_md4(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_md4_self_test(int verbose);
290
291#endif /* MBEDTLS_SELF_TEST */
292
293#ifdef __cplusplus
294}
295#endif
296
297#endif /* mbedtls_md4.h */
Configuration options (set of defines)
int mbedtls_md4_ret(const unsigned char *input, size_t ilen, unsigned char output[16])
Output = MD4( input buffer )
MBEDTLS_DEPRECATED void mbedtls_md4_process(mbedtls_md4_context *ctx, const unsigned char data[64])
MD4 process data block (internal use only)
int mbedtls_md4_starts_ret(mbedtls_md4_context *ctx)
MD4 context setup.
struct mbedtls_md4_context mbedtls_md4_context
MD4 context structure.
void mbedtls_md4_free(mbedtls_md4_context *ctx)
Clear MD4 context.
int mbedtls_md4_update_ret(mbedtls_md4_context *ctx, const unsigned char *input, size_t ilen)
MD4 process buffer.
#define MBEDTLS_DEPRECATED
Definition md4.h:163
int mbedtls_md4_finish_ret(mbedtls_md4_context *ctx, unsigned char output[16])
MD4 final digest.
MBEDTLS_DEPRECATED void mbedtls_md4_finish(mbedtls_md4_context *ctx, unsigned char output[16])
MD4 final digest.
void mbedtls_md4_init(mbedtls_md4_context *ctx)
Initialize MD4 context.
int mbedtls_md4_self_test(int verbose)
Checkup routine.
void mbedtls_md4_clone(mbedtls_md4_context *dst, const mbedtls_md4_context *src)
Clone (the state of) an MD4 context.
MBEDTLS_DEPRECATED void mbedtls_md4_update(mbedtls_md4_context *ctx, const unsigned char *input, size_t ilen)
MD4 process buffer.
int mbedtls_internal_md4_process(mbedtls_md4_context *ctx, const unsigned char data[64])
MD4 process data block (internal use only)
MBEDTLS_DEPRECATED void mbedtls_md4(const unsigned char *input, size_t ilen, unsigned char output[16])
Output = MD4( input buffer )
MBEDTLS_DEPRECATED void mbedtls_md4_starts(mbedtls_md4_context *ctx)
MD4 context setup.
MD4 context structure.
Definition md4.h:47
unsigned char buffer[64]
Definition md4.h:50
uint32_t total[2]
Definition md4.h:48
uint32_t state[4]
Definition md4.h:49