Mbed TLS v3.6.7
Toggle main menu visibility
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
#include "
mbedtls/private_access.h
"
17
18
#include "
mbedtls/build_info.h
"
19
20
#include <stddef.h>
21
#include <stdint.h>
22
23
#ifdef __cplusplus
24
extern
"C"
{
25
#endif
26
27
#if !defined(MBEDTLS_MD5_ALT)
28
// Regular implementation
29
//
30
39
typedef
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
}
44
mbedtls_md5_context
;
45
46
#else
/* MBEDTLS_MD5_ALT */
47
#include "
md5_alt.h
"
48
#endif
/* MBEDTLS_MD5_ALT */
49
60
void
mbedtls_md5_init
(
mbedtls_md5_context
*ctx);
61
72
void
mbedtls_md5_free
(
mbedtls_md5_context
*ctx);
73
85
void
mbedtls_md5_clone
(
mbedtls_md5_context
*dst,
86
const
mbedtls_md5_context
*src);
87
100
int
mbedtls_md5_starts
(
mbedtls_md5_context
*ctx);
101
116
int
mbedtls_md5_update
(
mbedtls_md5_context
*ctx,
117
const
unsigned
char
*input,
118
size_t
ilen);
119
133
int
mbedtls_md5_finish
(
mbedtls_md5_context
*ctx,
134
unsigned
char
output[16]);
135
149
int
mbedtls_internal_md5_process
(
mbedtls_md5_context
*ctx,
150
const
unsigned
char
data[64]);
151
166
int
mbedtls_md5
(
const
unsigned
char
*input,
167
size_t
ilen,
168
unsigned
char
output[16]);
169
170
#if defined(MBEDTLS_SELF_TEST)
171
182
int
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_info.h
Build-time configuration info.
mbedtls_md5
int mbedtls_md5(const unsigned char *input, size_t ilen, unsigned char output[16])
Output = MD5( input buffer ).
mbedtls_md5_clone
void mbedtls_md5_clone(mbedtls_md5_context *dst, const mbedtls_md5_context *src)
Clone (the state of) an MD5 context.
mbedtls_internal_md5_process
int mbedtls_internal_md5_process(mbedtls_md5_context *ctx, const unsigned char data[64])
MD5 process data block (internal use only).
mbedtls_md5_self_test
int mbedtls_md5_self_test(int verbose)
Checkup routine.
mbedtls_md5_starts
int mbedtls_md5_starts(mbedtls_md5_context *ctx)
MD5 context setup.
mbedtls_md5_free
void mbedtls_md5_free(mbedtls_md5_context *ctx)
Clear MD5 context.
mbedtls_md5_update
int mbedtls_md5_update(mbedtls_md5_context *ctx, const unsigned char *input, size_t ilen)
MD5 process buffer.
mbedtls_md5_init
void mbedtls_md5_init(mbedtls_md5_context *ctx)
Initialize MD5 context.
mbedtls_md5_finish
int mbedtls_md5_finish(mbedtls_md5_context *ctx, unsigned char output[16])
MD5 final digest.
md5_alt.h
private_access.h
Macro wrapper for struct's members.
MBEDTLS_PRIVATE
#define MBEDTLS_PRIVATE(member)
Definition
private_access.h:15
mbedtls_md5_context
MD5 context structure.
Definition
md5.h:39
include
mbedtls
md5.h
Generated on
for Mbed TLS v3.6.7 by
1.17.0