md5.h
mbedtls/private_access.h
mbedtls/build_info.h
stddef.h
stdint.h
crypto_builtin_primitives.h
mbedtls/build_info.h
mbedtls/check_config.h
mbedtls/config_adjust_legacy_crypto.h
mbedtls/config_adjust_psa_from_legacy.h
mbedtls/config_adjust_psa_superset_legacy.h
mbedtls/config_adjust_ssl.h
mbedtls/config_adjust_x509.h
mbedtls/config_psa.h
mbedtls/mbedtls_config.h
md5.h
mbedtls/private_access.h
psa/crypto_adjust_auto_enabled.h
psa/crypto_adjust_config_dependencies.h
psa/crypto_adjust_config_key_pair_types.h
psa/crypto_adjust_config_synonyms.h
psa/crypto_legacy.h
limits.h
stddef.h
stdint.h
debug.h
md5.h
net_sockets.h
oid.h
pk.h
pkcs7.h
psa_util.h
ssl.h
ssl_cache.h
ssl_ciphersuites.h
ssl_cookie.h
ssl_ticket.h
x509.h
x509_crl.h
x509_crt.h
x509_csr.h
crypto.h
crypto_builtin_primitives.h
crypto_driver_contexts_primitives.h
crypto_struct.h
mbedtls_md5_context
struct mbedtls_md5_context typedef struct mbedtls_md5_context mbedtls_md5_context mbedtls_md5_context

MD5 context structure.

MD5 is considered a weak message digest and its use constitutes a security risk. We recommend considering stronger message digests instead.

void void mbedtls_md5_init (mbedtls_md5_context *ctx) mbedtls_md5_init mbedtls_md5_context * ctx

Initialize MD5 context.

ctx

MD5 context to be initialized

MD5 is considered a weak message digest and its use constitutes a security risk. We recommend considering stronger message digests instead.

void void mbedtls_md5_free (mbedtls_md5_context *ctx) mbedtls_md5_free mbedtls_md5_context * ctx

Clear MD5 context.

ctx

MD5 context to be cleared

MD5 is considered a weak message digest and its use constitutes a security risk. We recommend considering stronger message digests instead.

void void mbedtls_md5_clone (mbedtls_md5_context *dst, const mbedtls_md5_context *src) mbedtls_md5_clone mbedtls_md5_context * dst const mbedtls_md5_context * src

Clone (the state of) an MD5 context.

dst

The destination context

src

The context to be cloned

MD5 is considered a weak message digest and its use constitutes a security risk. We recommend considering stronger message digests instead.

int int mbedtls_md5_starts (mbedtls_md5_context *ctx) mbedtls_md5_starts mbedtls_md5_context * ctx

MD5 context setup.

ctx

context to be initialized

0 if successful

MD5 is considered a weak message digest and its use constitutes a security risk. We recommend considering stronger message digests instead.

int int mbedtls_md5_update (mbedtls_md5_context *ctx, const unsigned char *input, size_t ilen) mbedtls_md5_update mbedtls_md5_context * ctx const unsigned char * input size_t ilen

MD5 process buffer.

ctx

MD5 context

input

buffer holding the data

ilen

length of the input data

0 if successful

MD5 is considered a weak message digest and its use constitutes a security risk. We recommend considering stronger message digests instead.

int int mbedtls_md5_finish (mbedtls_md5_context *ctx, unsigned char output[16]) mbedtls_md5_finish mbedtls_md5_context * ctx unsigned char output [16]

MD5 final digest.

ctx

MD5 context

output

MD5 checksum result

0 if successful

MD5 is considered a weak message digest and its use constitutes a security risk. We recommend considering stronger message digests instead.

int int mbedtls_internal_md5_process (mbedtls_md5_context *ctx, const unsigned char data[64]) mbedtls_internal_md5_process mbedtls_md5_context * ctx const unsigned char data [64]

MD5 process data block (internal use only)

ctx

MD5 context

data

buffer holding one block of data

0 if successful

MD5 is considered a weak message digest and its use constitutes a security risk. We recommend considering stronger message digests instead.

int int mbedtls_md5 (const unsigned char *input, size_t ilen, unsigned char output[16]) mbedtls_md5 const unsigned char * input size_t ilen unsigned char output [16]

Output = MD5( input buffer )

input

buffer holding the data

ilen

length of the input data

output

MD5 checksum result

0 if successful

MD5 is considered a weak message digest and its use constitutes a security risk. We recommend considering stronger message digests instead.

int int mbedtls_md5_self_test (int verbose) mbedtls_md5_self_test int verbose

Checkup routine.

0 if successful, or 1 if the test failed

MD5 is considered a weak message digest and its use constitutes a security risk. We recommend considering stronger message digests instead.

MD5 message digest algorithm (hash function)

MD5 is considered a weak message digest and its use constitutes a security risk. We recommend considering stronger message digests instead.

    /*
    *CopyrightTheMbedTLSContributors
    *SPDX-License-Identifier:Apache-2.0ORGPL-2.0-or-later
    */
    #ifndefMBEDTLS_MD5_H
    #defineMBEDTLS_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)
    //Regularimplementation
    //

    typedefstructmbedtls_md5_context{
    uint32_tMBEDTLS_PRIVATE(total)[2];
    uint32_tMBEDTLS_PRIVATE(state)[4];
    unsignedcharMBEDTLS_PRIVATE(buffer)[64];
    }
    mbedtls_md5_context;

    #else/*MBEDTLS_MD5_ALT*/
    #include"md5_alt.h"
    #endif/*MBEDTLS_MD5_ALT*/

    voidmbedtls_md5_init(mbedtls_md5_context*ctx);

    voidmbedtls_md5_free(mbedtls_md5_context*ctx);

    voidmbedtls_md5_clone(mbedtls_md5_context*dst,
    constmbedtls_md5_context*src);

    intmbedtls_md5_starts(mbedtls_md5_context*ctx);

    intmbedtls_md5_update(mbedtls_md5_context*ctx,
    constunsignedchar*input,
    size_tilen);

    intmbedtls_md5_finish(mbedtls_md5_context*ctx,
    unsignedcharoutput[16]);

    intmbedtls_internal_md5_process(mbedtls_md5_context*ctx,
    constunsignedchardata[64]);

    intmbedtls_md5(constunsignedchar*input,
    size_tilen,
    unsignedcharoutput[16]);

    #ifdefined(MBEDTLS_SELF_TEST)

    intmbedtls_md5_self_test(intverbose);

    #endif/*MBEDTLS_SELF_TEST*/

    #ifdef__cplusplus
    }
    #endif

    #endif/*mbedtls_md5.h*/