Switch to the new code style
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
diff --git a/include/mbedtls/sha512.h b/include/mbedtls/sha512.h
index 2b1fafd..ea54678 100644
--- a/include/mbedtls/sha512.h
+++ b/include/mbedtls/sha512.h
@@ -48,8 +48,7 @@
* checksum calculations. The choice between these two is
* made in the call to mbedtls_sha512_starts().
*/
-typedef struct mbedtls_sha512_context
-{
+typedef struct mbedtls_sha512_context {
uint64_t MBEDTLS_PRIVATE(total)[2]; /*!< The number of Bytes processed. */
uint64_t MBEDTLS_PRIVATE(state)[8]; /*!< The intermediate digest state. */
unsigned char MBEDTLS_PRIVATE(buffer)[128]; /*!< The data block being processed. */
@@ -70,7 +69,7 @@
* \param ctx The SHA-512 context to initialize. This must
* not be \c NULL.
*/
-void mbedtls_sha512_init( mbedtls_sha512_context *ctx );
+void mbedtls_sha512_init(mbedtls_sha512_context *ctx);
/**
* \brief This function clears a SHA-512 context.
@@ -80,7 +79,7 @@
* is not \c NULL, it must point to an initialized
* SHA-512 context.
*/
-void mbedtls_sha512_free( mbedtls_sha512_context *ctx );
+void mbedtls_sha512_free(mbedtls_sha512_context *ctx);
/**
* \brief This function clones the state of a SHA-512 context.
@@ -88,8 +87,8 @@
* \param dst The destination context. This must be initialized.
* \param src The context to clone. This must be initialized.
*/
-void mbedtls_sha512_clone( mbedtls_sha512_context *dst,
- const mbedtls_sha512_context *src );
+void mbedtls_sha512_clone(mbedtls_sha512_context *dst,
+ const mbedtls_sha512_context *src);
/**
* \brief This function starts a SHA-384 or SHA-512 checksum
@@ -106,7 +105,7 @@
* \return \c 0 on success.
* \return A negative error code on failure.
*/
-int mbedtls_sha512_starts( mbedtls_sha512_context *ctx, int is384 );
+int mbedtls_sha512_starts(mbedtls_sha512_context *ctx, int is384);
/**
* \brief This function feeds an input buffer into an ongoing
@@ -121,9 +120,9 @@
* \return \c 0 on success.
* \return A negative error code on failure.
*/
-int mbedtls_sha512_update( mbedtls_sha512_context *ctx,
- const unsigned char *input,
- size_t ilen );
+int mbedtls_sha512_update(mbedtls_sha512_context *ctx,
+ const unsigned char *input,
+ size_t ilen);
/**
* \brief This function finishes the SHA-512 operation, and writes
@@ -138,8 +137,8 @@
* \return \c 0 on success.
* \return A negative error code on failure.
*/
-int mbedtls_sha512_finish( mbedtls_sha512_context *ctx,
- unsigned char *output );
+int mbedtls_sha512_finish(mbedtls_sha512_context *ctx,
+ unsigned char *output);
/**
* \brief This function processes a single data block within
@@ -153,8 +152,8 @@
* \return \c 0 on success.
* \return A negative error code on failure.
*/
-int mbedtls_internal_sha512_process( mbedtls_sha512_context *ctx,
- const unsigned char data[128] );
+int mbedtls_internal_sha512_process(mbedtls_sha512_context *ctx,
+ const unsigned char data[128]);
/**
* \brief This function calculates the SHA-512 or SHA-384
@@ -185,31 +184,31 @@
* \return \c 0 on success.
* \return A negative error code on failure.
*/
-int mbedtls_sha512( const unsigned char *input,
- size_t ilen,
- unsigned char *output,
- int is384 );
+int mbedtls_sha512(const unsigned char *input,
+ size_t ilen,
+ unsigned char *output,
+ int is384);
#if defined(MBEDTLS_SELF_TEST)
#if defined(MBEDTLS_SHA384_C)
- /**
+/**
* \brief The SHA-384 checkup routine.
*
* \return \c 0 on success.
* \return \c 1 on failure.
*/
-int mbedtls_sha384_self_test( int verbose );
+int mbedtls_sha384_self_test(int verbose);
#endif /* MBEDTLS_SHA384_C */
#if defined(MBEDTLS_SHA512_C)
- /**
+/**
* \brief The SHA-512 checkup routine.
*
* \return \c 0 on success.
* \return \c 1 on failure.
*/
-int mbedtls_sha512_self_test( int verbose );
+int mbedtls_sha512_self_test(int verbose);
#endif /* MBEDTLS_SHA512_C */
#endif /* MBEDTLS_SELF_TEST */