md4.h
mbedtls/config.h
stddef.h
stdint.h
crypto_builtin_primitives.h
mbedtls/check_config.h
mbedtls/config.h
md4.h
limits.h
stddef.h
stdint.h
md4.h
crypto.h
crypto_builtin_primitives.h
crypto_driver_contexts_primitives.h
crypto_struct.h
mbedtls_md4_context
MBEDTLS_ERR_MD4_HW_ACCEL_FAILED
-0x002D

MD4 hardware accelerator failed

MBEDTLS_DEPRECATED
__attribute__((deprecated))
MBEDTLS_DEPRECATED
__attribute__((deprecated))
struct mbedtls_md4_context typedef struct mbedtls_md4_context mbedtls_md4_context mbedtls_md4_context

MD4 context structure.

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

void void mbedtls_md4_init (mbedtls_md4_context *ctx) mbedtls_md4_init mbedtls_md4_context * ctx

Initialize MD4 context.

ctx

MD4 context to be initialized

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

void void mbedtls_md4_free (mbedtls_md4_context *ctx) mbedtls_md4_free mbedtls_md4_context * ctx

Clear MD4 context.

ctx

MD4 context to be cleared

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

void void mbedtls_md4_clone (mbedtls_md4_context *dst, const mbedtls_md4_context *src) mbedtls_md4_clone mbedtls_md4_context * dst const mbedtls_md4_context * src

Clone (the state of) an MD4 context.

dst

The destination context

src

The context to be cloned

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

int int mbedtls_md4_starts_ret (mbedtls_md4_context *ctx) mbedtls_md4_starts_ret mbedtls_md4_context * ctx

MD4 context setup.

ctx

context to be initialized

0 if successful

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

int int mbedtls_md4_update_ret (mbedtls_md4_context *ctx, const unsigned char *input, size_t ilen) mbedtls_md4_update_ret mbedtls_md4_context * ctx const unsigned char * input size_t ilen

MD4 process buffer.

ctx

MD4 context

input

buffer holding the data

ilen

length of the input data

0 if successful

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

int int mbedtls_md4_finish_ret (mbedtls_md4_context *ctx, unsigned char output[16]) mbedtls_md4_finish_ret mbedtls_md4_context * ctx unsigned char output [16]

MD4 final digest.

ctx

MD4 context

output

MD4 checksum result

0 if successful

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

int int mbedtls_internal_md4_process (mbedtls_md4_context *ctx, const unsigned char data[64]) mbedtls_internal_md4_process mbedtls_md4_context * ctx const unsigned char data [64]

MD4 process data block (internal use only)

ctx

MD4 context

data

buffer holding one block of data

0 if successful

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

MBEDTLS_DEPRECATED void MBEDTLS_DEPRECATED void mbedtls_md4_starts (mbedtls_md4_context *ctx) mbedtls_md4_starts mbedtls_md4_context * ctx

MD4 context setup.

Deprecated

Superseded by mbedtls_md4_starts_ret() in 2.7.0

ctx

context to be initialized

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

MBEDTLS_DEPRECATED void MBEDTLS_DEPRECATED void mbedtls_md4_update (mbedtls_md4_context *ctx, const unsigned char *input, size_t ilen) mbedtls_md4_update mbedtls_md4_context * ctx const unsigned char * input size_t ilen

MD4 process buffer.

Deprecated

Superseded by mbedtls_md4_update_ret() in 2.7.0

ctx

MD4 context

input

buffer holding the data

ilen

length of the input data

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

MBEDTLS_DEPRECATED void MBEDTLS_DEPRECATED void mbedtls_md4_finish (mbedtls_md4_context *ctx, unsigned char output[16]) mbedtls_md4_finish mbedtls_md4_context * ctx unsigned char output [16]

MD4 final digest.

Deprecated

Superseded by mbedtls_md4_finish_ret() in 2.7.0

ctx

MD4 context

output

MD4 checksum result

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

MBEDTLS_DEPRECATED void MBEDTLS_DEPRECATED void mbedtls_md4_process (mbedtls_md4_context *ctx, const unsigned char data[64]) mbedtls_md4_process mbedtls_md4_context * ctx const unsigned char data [64]

MD4 process data block (internal use only)

Deprecated

Superseded by mbedtls_internal_md4_process() in 2.7.0

ctx

MD4 context

data

buffer holding one block of data

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

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

Output = MD4( input buffer )

input

buffer holding the data

ilen

length of the input data

output

MD4 checksum result

0 if successful

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

MBEDTLS_DEPRECATED void MBEDTLS_DEPRECATED void mbedtls_md4 (const unsigned char *input, size_t ilen, unsigned char output[16]) mbedtls_md4 const unsigned char * input size_t ilen unsigned char output [16]

Output = MD4( input buffer )

Deprecated

Superseded by mbedtls_md4_ret() in 2.7.0

input

buffer holding the data

ilen

length of the input data

output

MD4 checksum result

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

int int mbedtls_md4_self_test (int verbose) mbedtls_md4_self_test int verbose

Checkup routine.

0 if successful, or 1 if the test failed

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

MD4 message digest algorithm (hash function)

MD4 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_MD4_H
    #defineMBEDTLS_MD4_H

    #if!defined(MBEDTLS_CONFIG_FILE)
    #include"mbedtls/config.h"
    #else
    #includeMBEDTLS_CONFIG_FILE
    #endif

    #include<stddef.h>
    #include<stdint.h>

    /*MBEDTLS_ERR_MD4_HW_ACCEL_FAILEDisdeprecatedandshouldnotbeused.*/
    #defineMBEDTLS_ERR_MD4_HW_ACCEL_FAILED-0x002D

    #ifdef__cplusplus
    extern"C"{
    #endif

    #if!defined(MBEDTLS_MD4_ALT)
    //Regularimplementation
    //

    typedefstructmbedtls_md4_context{
    uint32_ttotal[2];
    uint32_tstate[4];
    unsignedcharbuffer[64];
    }
    mbedtls_md4_context;

    #else/*MBEDTLS_MD4_ALT*/
    #include"md4_alt.h"
    #endif/*MBEDTLS_MD4_ALT*/

    voidmbedtls_md4_init(mbedtls_md4_context*ctx);

    voidmbedtls_md4_free(mbedtls_md4_context*ctx);

    voidmbedtls_md4_clone(mbedtls_md4_context*dst,
    constmbedtls_md4_context*src);

    intmbedtls_md4_starts_ret(mbedtls_md4_context*ctx);

    intmbedtls_md4_update_ret(mbedtls_md4_context*ctx,
    constunsignedchar*input,
    size_tilen);

    intmbedtls_md4_finish_ret(mbedtls_md4_context*ctx,
    unsignedcharoutput[16]);

    intmbedtls_internal_md4_process(mbedtls_md4_context*ctx,
    constunsignedchardata[64]);

    #if!defined(MBEDTLS_DEPRECATED_REMOVED)
    #ifdefined(MBEDTLS_DEPRECATED_WARNING)
    #defineMBEDTLS_DEPRECATED__attribute__((deprecated))
    #else
    #defineMBEDTLS_DEPRECATED
    #endif
    MBEDTLS_DEPRECATEDvoidmbedtls_md4_starts(mbedtls_md4_context*ctx);

    MBEDTLS_DEPRECATEDvoidmbedtls_md4_update(mbedtls_md4_context*ctx,
    constunsignedchar*input,
    size_tilen);

    MBEDTLS_DEPRECATEDvoidmbedtls_md4_finish(mbedtls_md4_context*ctx,
    unsignedcharoutput[16]);

    MBEDTLS_DEPRECATEDvoidmbedtls_md4_process(mbedtls_md4_context*ctx,
    constunsignedchardata[64]);

    #undefMBEDTLS_DEPRECATED
    #endif/*!MBEDTLS_DEPRECATED_REMOVED*/

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

    #if!defined(MBEDTLS_DEPRECATED_REMOVED)
    #ifdefined(MBEDTLS_DEPRECATED_WARNING)
    #defineMBEDTLS_DEPRECATED__attribute__((deprecated))
    #else
    #defineMBEDTLS_DEPRECATED
    #endif
    MBEDTLS_DEPRECATEDvoidmbedtls_md4(constunsignedchar*input,
    size_tilen,
    unsignedcharoutput[16]);

    #undefMBEDTLS_DEPRECATED
    #endif/*!MBEDTLS_DEPRECATED_REMOVED*/

    #ifdefined(MBEDTLS_SELF_TEST)

    intmbedtls_md4_self_test(intverbose);

    #endif/*MBEDTLS_SELF_TEST*/

    #ifdef__cplusplus
    }
    #endif

    #endif/*mbedtls_md4.h*/