Loading...
Searching...
No Matches
md5.h
Go to the documentation of this file.
/*
* Copyright The Mbed TLS Contributors
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
*/
#ifndef MBEDTLS_MD5_H
#define MBEDTLS_MD5_H
#include "mbedtls/private_access.h"
#include "mbedtls/build_info.h"
#include <stddef.h>
#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif
#if !defined(MBEDTLS_MD5_ALT)
// Regular implementation
//
typedef struct mbedtls_md5_context {
uint32_t MBEDTLS_PRIVATE(total)[2];
uint32_t MBEDTLS_PRIVATE(state)[4];
unsigned char MBEDTLS_PRIVATE(buffer)[64];
}
mbedtls_md5_context;
#else /* MBEDTLS_MD5_ALT */
#include "md5_alt.h"
#endif /* MBEDTLS_MD5_ALT */
void mbedtls_md5_init(mbedtls_md5_context *ctx);
void mbedtls_md5_free(mbedtls_md5_context *ctx);
void mbedtls_md5_clone(mbedtls_md5_context *dst,
const mbedtls_md5_context *src);
int mbedtls_md5_starts(mbedtls_md5_context *ctx);
int mbedtls_md5_update(mbedtls_md5_context *ctx,
const unsigned char *input,
size_t ilen);
int mbedtls_md5_finish(mbedtls_md5_context *ctx,
unsigned char output[16]);
int mbedtls_internal_md5_process(mbedtls_md5_context *ctx,
const unsigned char data[64]);
int mbedtls_md5(const unsigned char *input,
size_t ilen,
unsigned char output[16]);
#if defined(MBEDTLS_SELF_TEST)
int mbedtls_md5_self_test(int verbose);
#endif /* MBEDTLS_SELF_TEST */
#ifdef __cplusplus
}
#endif
#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_context
struct mbedtls_md5_context mbedtls_md5_context
MD5 context structure.
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