123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136 |
- #ifndef MBEDTLS_MD2_H
- #define MBEDTLS_MD2_H
- #if !defined(MBEDTLS_CONFIG_FILE)
- #include "config.h"
- #else
- #include MBEDTLS_CONFIG_FILE
- #endif
- #include <stddef.h>
- #if !defined(MBEDTLS_MD2_ALT)
- #ifdef __cplusplus
- extern "C" {
- #endif
- typedef struct
- {
- unsigned char cksum[16];
- unsigned char state[48];
- unsigned char buffer[16];
- size_t left;
- }
- mbedtls_md2_context;
- void mbedtls_md2_init( mbedtls_md2_context *ctx );
- void mbedtls_md2_free( mbedtls_md2_context *ctx );
- void mbedtls_md2_clone( mbedtls_md2_context *dst,
- const mbedtls_md2_context *src );
- void mbedtls_md2_starts( mbedtls_md2_context *ctx );
- void mbedtls_md2_update( mbedtls_md2_context *ctx, const unsigned char *input, size_t ilen );
- void mbedtls_md2_finish( mbedtls_md2_context *ctx, unsigned char output[16] );
- #ifdef __cplusplus
- }
- #endif
- #else
- #include "md2_alt.h"
- #endif
- #ifdef __cplusplus
- extern "C" {
- #endif
- void mbedtls_md2( const unsigned char *input, size_t ilen, unsigned char output[16] );
- int mbedtls_md2_self_test( int verbose );
- void mbedtls_md2_process( mbedtls_md2_context *ctx );
- #ifdef __cplusplus
- }
- #endif
- #endif
|