md2.h
mbedtls/config.h
stddef.h
crypto_builtin_primitives.h
mbedtls/check_config.h
mbedtls/config.h
md2.h
limits.h
stddef.h
md2.h
crypto.h
crypto_builtin_primitives.h
crypto_driver_contexts_primitives.h
crypto_struct.h
mbedtls_md2_context
MBEDTLS_ERR_MD2_HW_ACCEL_FAILED
-0x002B

MD2 hardware accelerator failed

MBEDTLS_DEPRECATED
__attribute__((deprecated))
MBEDTLS_DEPRECATED
__attribute__((deprecated))
struct mbedtls_md2_context typedef struct mbedtls_md2_context mbedtls_md2_context mbedtls_md2_context

MD2 context structure.

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

void void mbedtls_md2_init (mbedtls_md2_context *ctx) mbedtls_md2_init mbedtls_md2_context * ctx

Initialize MD2 context.

ctx

MD2 context to be initialized

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

void void mbedtls_md2_free (mbedtls_md2_context *ctx) mbedtls_md2_free mbedtls_md2_context * ctx

Clear MD2 context.

ctx

MD2 context to be cleared

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

void void mbedtls_md2_clone (mbedtls_md2_context *dst, const mbedtls_md2_context *src) mbedtls_md2_clone mbedtls_md2_context * dst const mbedtls_md2_context * src

Clone (the state of) an MD2 context.

dst

The destination context

src

The context to be cloned

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

int int mbedtls_md2_starts_ret (mbedtls_md2_context *ctx) mbedtls_md2_starts_ret mbedtls_md2_context * ctx

MD2 context setup.

ctx

context to be initialized

0 if successful

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

int int mbedtls_md2_update_ret (mbedtls_md2_context *ctx, const unsigned char *input, size_t ilen) mbedtls_md2_update_ret mbedtls_md2_context * ctx const unsigned char * input size_t ilen

MD2 process buffer.

ctx

MD2 context

input

buffer holding the data

ilen

length of the input data

0 if successful

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

int int mbedtls_md2_finish_ret (mbedtls_md2_context *ctx, unsigned char output[16]) mbedtls_md2_finish_ret mbedtls_md2_context * ctx unsigned char output [16]

MD2 final digest.

ctx

MD2 context

output

MD2 checksum result

0 if successful

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

int int mbedtls_internal_md2_process (mbedtls_md2_context *ctx) mbedtls_internal_md2_process mbedtls_md2_context * ctx

MD2 process data block (internal use only)

ctx

MD2 context

0 if successful

MD2 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_md2_starts (mbedtls_md2_context *ctx) mbedtls_md2_starts mbedtls_md2_context * ctx

MD2 context setup.

Deprecated

Superseded by mbedtls_md2_starts_ret() in 2.7.0

ctx

context to be initialized

MD2 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_md2_update (mbedtls_md2_context *ctx, const unsigned char *input, size_t ilen) mbedtls_md2_update mbedtls_md2_context * ctx const unsigned char * input size_t ilen

MD2 process buffer.

Deprecated

Superseded by mbedtls_md2_update_ret() in 2.7.0

ctx

MD2 context

input

buffer holding the data

ilen

length of the input data

MD2 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_md2_finish (mbedtls_md2_context *ctx, unsigned char output[16]) mbedtls_md2_finish mbedtls_md2_context * ctx unsigned char output [16]

MD2 final digest.

Deprecated

Superseded by mbedtls_md2_finish_ret() in 2.7.0

ctx

MD2 context

output

MD2 checksum result

MD2 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_md2_process (mbedtls_md2_context *ctx) mbedtls_md2_process mbedtls_md2_context * ctx

MD2 process data block (internal use only)

Deprecated

Superseded by mbedtls_internal_md2_process() in 2.7.0

ctx

MD2 context

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

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

Output = MD2( input buffer )

input

buffer holding the data

ilen

length of the input data

output

MD2 checksum result

MD2 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_md2 (const unsigned char *input, size_t ilen, unsigned char output[16]) mbedtls_md2 const unsigned char * input size_t ilen unsigned char output [16]

Output = MD2( input buffer )

Deprecated

Superseded by mbedtls_md2_ret() in 2.7.0

input

buffer holding the data

ilen

length of the input data

output

MD2 checksum result

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

int int mbedtls_md2_self_test (int verbose) mbedtls_md2_self_test int verbose

Checkup routine.

0 if successful, or 1 if the test failed

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

MD2 message digest algorithm (hash function)

MD2 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_MD2_H
    #defineMBEDTLS_MD2_H

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

    #include<stddef.h>

    /*MBEDTLS_ERR_MD2_HW_ACCEL_FAILEDisdeprecatedandshouldnotbeused.*/
    #defineMBEDTLS_ERR_MD2_HW_ACCEL_FAILED-0x002B

    #ifdef__cplusplus
    extern"C"{
    #endif

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

    typedefstructmbedtls_md2_context{
    unsignedcharcksum[16];
    unsignedcharstate[48];
    unsignedcharbuffer[16];
    size_tleft;
    }
    mbedtls_md2_context;

    #else/*MBEDTLS_MD2_ALT*/
    #include"md2_alt.h"
    #endif/*MBEDTLS_MD2_ALT*/

    voidmbedtls_md2_init(mbedtls_md2_context*ctx);

    voidmbedtls_md2_free(mbedtls_md2_context*ctx);

    voidmbedtls_md2_clone(mbedtls_md2_context*dst,
    constmbedtls_md2_context*src);

    intmbedtls_md2_starts_ret(mbedtls_md2_context*ctx);

    intmbedtls_md2_update_ret(mbedtls_md2_context*ctx,
    constunsignedchar*input,
    size_tilen);

    intmbedtls_md2_finish_ret(mbedtls_md2_context*ctx,
    unsignedcharoutput[16]);

    intmbedtls_internal_md2_process(mbedtls_md2_context*ctx);

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

    MBEDTLS_DEPRECATEDvoidmbedtls_md2_update(mbedtls_md2_context*ctx,
    constunsignedchar*input,
    size_tilen);

    MBEDTLS_DEPRECATEDvoidmbedtls_md2_finish(mbedtls_md2_context*ctx,
    unsignedcharoutput[16]);

    MBEDTLS_DEPRECATEDvoidmbedtls_md2_process(mbedtls_md2_context*ctx);

    #undefMBEDTLS_DEPRECATED
    #endif/*!MBEDTLS_DEPRECATED_REMOVED*/

    intmbedtls_md2_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_md2(constunsignedchar*input,
    size_tilen,
    unsignedcharoutput[16]);

    #undefMBEDTLS_DEPRECATED
    #endif/*!MBEDTLS_DEPRECATED_REMOVED*/

    #ifdefined(MBEDTLS_SELF_TEST)

    intmbedtls_md2_self_test(intverbose);

    #endif/*MBEDTLS_SELF_TEST*/

    #ifdef__cplusplus
    }
    #endif

    #endif/*mbedtls_md2.h*/