29 #ifndef MBEDTLS_SHA1_H
30 #define MBEDTLS_SHA1_H
39 #define MBEDTLS_ERR_SHA1_BAD_INPUT_DATA -0x0073
45 #if !defined(MBEDTLS_SHA1_ALT)
57 typedef struct mbedtls_sha1_context
109 const mbedtls_sha1_context *src );
144 const unsigned char *input,
164 unsigned char output[20] );
182 const unsigned char data[64] );
209 unsigned char output[20] );
211 #if defined(MBEDTLS_SELF_TEST)
void mbedtls_sha1_clone(mbedtls_sha1_context *dst, const mbedtls_sha1_context *src)
This function clones the state of a SHA-1 context.
int mbedtls_sha1_self_test(int verbose)
The SHA-1 checkup routine.
int mbedtls_sha1_finish(mbedtls_sha1_context *ctx, unsigned char output[20])
This function finishes the SHA-1 operation, and writes the result to the output buffer.
void mbedtls_sha1_init(mbedtls_sha1_context *ctx)
This function initializes a SHA-1 context.
int mbedtls_sha1_starts(mbedtls_sha1_context *ctx)
This function starts a SHA-1 checksum calculation.
#define MBEDTLS_PRIVATE(member)
int mbedtls_internal_sha1_process(mbedtls_sha1_context *ctx, const unsigned char data[64])
SHA-1 process data block (internal use only).
Macro wrapper for struct's memebrs.
int mbedtls_sha1(const unsigned char *input, size_t ilen, unsigned char output[20])
This function calculates the SHA-1 checksum of a buffer.
Build-time configuration info.
void mbedtls_sha1_free(mbedtls_sha1_context *ctx)
This function clears a SHA-1 context.
int mbedtls_sha1_update(mbedtls_sha1_context *ctx, const unsigned char *input, size_t ilen)
This function feeds an input buffer into an ongoing SHA-1 checksum calculation.