Mbed TLS v3.6.0
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
17
18#include "mbedtls/build_info.h"
19
20#include <stddef.h>
21#include <stdint.h>
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
27#if !defined(MBEDTLS_MD5_ALT)
28// Regular implementation
29//
30
39typedef struct mbedtls_md5_context {
40 uint32_t MBEDTLS_PRIVATE(total)[2];
41 uint32_t MBEDTLS_PRIVATE(state)[4];
42 unsigned char MBEDTLS_PRIVATE(buffer)[64];
43}
45
46#else /* MBEDTLS_MD5_ALT */
47#include "md5_alt.h"
48#endif /* MBEDTLS_MD5_ALT */
49
61
73
86 const mbedtls_md5_context *src);
87
101
117 const unsigned char *input,
118 size_t ilen);
119
134 unsigned char output[16]);
135
150 const unsigned char data[64]);
151
166int mbedtls_md5(const unsigned char *input,
167 size_t ilen,
168 unsigned char output[16]);
169
170#if defined(MBEDTLS_SELF_TEST)
171
182int mbedtls_md5_self_test(int verbose);
183
184#endif /* MBEDTLS_SELF_TEST */
185
186#ifdef __cplusplus
187}
188#endif
189
190#endif /* mbedtls_md5.h */
Build-time configuration info.
int mbedtls_md5(const unsigned char *input, size_t ilen, unsigned char output[16])
Output = MD5( input buffer )
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)
int mbedtls_md5_self_test(int verbose)
Checkup routine.
int mbedtls_md5_starts(mbedtls_md5_context *ctx)
MD5 context setup.
void mbedtls_md5_free(mbedtls_md5_context *ctx)
Clear MD5 context.
int mbedtls_md5_update(mbedtls_md5_context *ctx, const unsigned char *input, size_t ilen)
MD5 process buffer.
void mbedtls_md5_init(mbedtls_md5_context *ctx)
Initialize MD5 context.
int mbedtls_md5_finish(mbedtls_md5_context *ctx, unsigned char output[16])
MD5 final digest.
Macro wrapper for struct's members.
#define MBEDTLS_PRIVATE(member)
MD5 context structure.
Definition md5.h:39