}
mbedtls_sha1_context;
-/**
- * \brief Initialize SHA-1 context
- *
- * \param ctx SHA-1 context to be initialized
- */
-void mbedtls_sha1_init( mbedtls_sha1_context *ctx );
-
-/**
- * \brief Clear SHA-1 context
- *
- * \param ctx SHA-1 context to be cleared
- */
-void mbedtls_sha1_free( mbedtls_sha1_context *ctx );
-
-/**
- * \brief Clone (the state of) a SHA-1 context
- *
- * \param dst The destination context
- * \param src The context to be cloned
- */
-void mbedtls_sha1_clone( mbedtls_sha1_context *dst,
- const mbedtls_sha1_context *src );
-
-/**
- * \brief SHA-1 context setup
- *
- * \param ctx context to be initialized
- */
-void mbedtls_sha1_starts( mbedtls_sha1_context *ctx );
-
-/**
- * \brief SHA-1 process buffer
- *
- * \param ctx SHA-1 context
- * \param input buffer holding the data
- * \param ilen length of the input data
- */
-void mbedtls_sha1_update( mbedtls_sha1_context *ctx, const unsigned char *input, size_t ilen );
-
-/**
- * \brief SHA-1 final digest
- *
- * \param ctx SHA-1 context
- * \param output SHA-1 checksum result
- */
-void mbedtls_sha1_finish( mbedtls_sha1_context *ctx, unsigned char output[20] );
-
-/* Internal use */
-void mbedtls_sha1_process( mbedtls_sha1_context *ctx, const unsigned char data[64] );
-
#endif
#ifdef __cplusplus
}
mbedtls_sha256_context;
-/**
- * \brief Initialize SHA-256 context
- *
- * \param ctx SHA-256 context to be initialized
- */
-void mbedtls_sha256_init( mbedtls_sha256_context *ctx );
-
-/**
- * \brief Clear SHA-256 context
- *
- * \param ctx SHA-256 context to be cleared
- */
-void mbedtls_sha256_free( mbedtls_sha256_context *ctx );
-
-/**
- * \brief Clone (the state of) a SHA-256 context
- *
- * \param dst The destination context
- * \param src The context to be cloned
- */
-void mbedtls_sha256_clone( mbedtls_sha256_context *dst,
- const mbedtls_sha256_context *src );
-
-/**
- * \brief SHA-256 context setup
- *
- * \param ctx context to be initialized
- * \param is224 0 = use SHA256, 1 = use SHA224
- */
-void mbedtls_sha256_starts( mbedtls_sha256_context *ctx, int is224 );
-
-/**
- * \brief SHA-256 process buffer
- *
- * \param ctx SHA-256 context
- * \param input buffer holding the data
- * \param ilen length of the input data
- */
-void mbedtls_sha256_update( mbedtls_sha256_context *ctx, const unsigned char *input,
- size_t ilen );
-
-/**
- * \brief SHA-256 final digest
- *
- * \param ctx SHA-256 context
- * \param output SHA-224/256 checksum result
- */
-void mbedtls_sha256_finish( mbedtls_sha256_context *ctx, unsigned char output[32] );
-
-/* Internal use */
-void mbedtls_sha256_process( mbedtls_sha256_context *ctx, const unsigned char data[64] );
-
#endif
#ifdef __cplusplus
}
mbedtls_sha512_context;
-/**
- * \brief Initialize SHA-512 context
- *
- * \param ctx SHA-512 context to be initialized
- */
-void mbedtls_sha512_init( mbedtls_sha512_context *ctx );
-
-/**
- * \brief Clear SHA-512 context
- *
- * \param ctx SHA-512 context to be cleared
- */
-void mbedtls_sha512_free( mbedtls_sha512_context *ctx );
-
-/**
- * \brief Clone (the state of) a SHA-512 context
- *
- * \param dst The destination context
- * \param src The context to be cloned
- */
-void mbedtls_sha512_clone( mbedtls_sha512_context *dst,
- const mbedtls_sha512_context *src );
-
-/**
- * \brief SHA-512 context setup
- *
- * \param ctx context to be initialized
- * \param is384 0 = use SHA512, 1 = use SHA384
- */
-void mbedtls_sha512_starts( mbedtls_sha512_context *ctx, int is384 );
-
-/**
- * \brief SHA-512 process buffer
- *
- * \param ctx SHA-512 context
- * \param input buffer holding the data
- * \param ilen length of the input data
- */
-void mbedtls_sha512_update( mbedtls_sha512_context *ctx, const unsigned char *input,
- size_t ilen );
-
-/**
- * \brief SHA-512 final digest
- *
- * \param ctx SHA-512 context
- * \param output SHA-384/512 checksum result
- */
-void mbedtls_sha512_finish( mbedtls_sha512_context *ctx, unsigned char output[64] );
-
-/* Internal use */
-void mbedtls_sha512_process( mbedtls_sha512_context *ctx, const unsigned char data[128] );
-
#endif
#ifdef __cplusplus