123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136 |
- #ifndef MBEDTLS_SHA1_H
- #define MBEDTLS_SHA1_H
- #if !defined(MBEDTLS_CONFIG_FILE)
- #include "config.h"
- #else
- #include MBEDTLS_CONFIG_FILE
- #endif
- #include <stddef.h>
- #include <stdint.h>
- #if !defined(MBEDTLS_SHA1_ALT)
- #ifdef __cplusplus
- extern "C" {
- #endif
- typedef struct
- {
- uint32_t total[2];
- uint32_t state[5];
- unsigned char buffer[64];
- }
- mbedtls_sha1_context;
- void mbedtls_sha1_init( mbedtls_sha1_context *ctx );
- void mbedtls_sha1_free( mbedtls_sha1_context *ctx );
- void mbedtls_sha1_clone( mbedtls_sha1_context *dst,
- const mbedtls_sha1_context *src );
- void mbedtls_sha1_starts( mbedtls_sha1_context *ctx );
- void mbedtls_sha1_update( mbedtls_sha1_context *ctx, const unsigned char *input, size_t ilen );
- void mbedtls_sha1_finish( mbedtls_sha1_context *ctx, unsigned char output[20] );
- void mbedtls_sha1_process( mbedtls_sha1_context *ctx, const unsigned char data[64] );
- #ifdef __cplusplus
- }
- #endif
- #else
- #include "sha1_alt.h"
- #endif
- #ifdef __cplusplus
- extern "C" {
- #endif
- void mbedtls_sha1( const unsigned char *input, size_t ilen, unsigned char output[20] );
- int mbedtls_sha1_self_test( int verbose );
- #ifdef __cplusplus
- }
- #endif
- #endif
|