56 #ifndef MBEDTLS_SHA1_H
57 #define MBEDTLS_SHA1_H
59 #if !defined(MBEDTLS_CONFIG_FILE)
62 #include MBEDTLS_CONFIG_FILE
70 #define MBEDTLS_ERR_SHA1_HW_ACCEL_FAILED -0x0035
72 #define MBEDTLS_ERR_SHA1_BAD_INPUT_DATA -0x0073
78 #if !defined(MBEDTLS_SHA1_ALT)
177 const unsigned char *input,
197 unsigned char output[20] );
215 const unsigned char data[64] );
217 #if !defined(MBEDTLS_DEPRECATED_REMOVED)
218 #if defined(MBEDTLS_DEPRECATED_WARNING)
219 #define MBEDTLS_DEPRECATED __attribute__((deprecated))
221 #define MBEDTLS_DEPRECATED
255 const unsigned char *input,
274 unsigned char output[20] );
291 const unsigned char data[64] );
293 #undef MBEDTLS_DEPRECATED
321 unsigned char output[20] );
323 #if !defined(MBEDTLS_DEPRECATED_REMOVED)
324 #if defined(MBEDTLS_DEPRECATED_WARNING)
325 #define MBEDTLS_DEPRECATED __attribute__((deprecated))
327 #define MBEDTLS_DEPRECATED
353 unsigned char output[20] );
355 #undef MBEDTLS_DEPRECATED
358 #if defined(MBEDTLS_SELF_TEST)
Configuration options (set of defines)
MBEDTLS_DEPRECATED void 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_free(mbedtls_sha1_context *ctx)
This function clears a SHA-1 context.
void mbedtls_sha1_clone(mbedtls_sha1_context *dst, const mbedtls_sha1_context *src)
This function clones the state of a SHA-1 context.
MBEDTLS_DEPRECATED void mbedtls_sha1_starts(mbedtls_sha1_context *ctx)
This function starts a SHA-1 checksum calculation.
MBEDTLS_DEPRECATED void mbedtls_sha1_process(mbedtls_sha1_context *ctx, const unsigned char data[64])
SHA-1 process data block (internal use only).
int mbedtls_sha1_ret(const unsigned char *input, size_t ilen, unsigned char output[20])
This function calculates the SHA-1 checksum of a buffer.
int mbedtls_sha1_self_test(int verbose)
The SHA-1 checkup routine.
int mbedtls_sha1_update_ret(mbedtls_sha1_context *ctx, const unsigned char *input, size_t ilen)
This function feeds an input buffer into an ongoing SHA-1 checksum calculation.
int mbedtls_internal_sha1_process(mbedtls_sha1_context *ctx, const unsigned char data[64])
SHA-1 process data block (internal use only).
int mbedtls_sha1_starts_ret(mbedtls_sha1_context *ctx)
This function starts a SHA-1 checksum calculation.
MBEDTLS_DEPRECATED void 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.
#define MBEDTLS_DEPRECATED
MBEDTLS_DEPRECATED void mbedtls_sha1(const unsigned char *input, size_t ilen, unsigned char output[20])
This function calculates the SHA-1 checksum of a buffer.
struct mbedtls_sha1_context mbedtls_sha1_context
The SHA-1 context structure.
int mbedtls_sha1_finish_ret(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.
The SHA-1 context structure.