The Great Renaming
A simple execution of tmp/invoke-rename.pl
diff --git a/include/mbedtls/sha512.h b/include/mbedtls/sha512.h
index c5cb11b..55112dd 100644
--- a/include/mbedtls/sha512.h
+++ b/include/mbedtls/sha512.h
@@ -1,5 +1,5 @@
/**
- * \file sha512.h
+ * \file mbedtls_sha512.h
*
* \brief SHA-384 and SHA-512 cryptographic hash function
*
@@ -21,13 +21,13 @@
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef POLARSSL_SHA512_H
-#define POLARSSL_SHA512_H
+#ifndef MBEDTLS_SHA512_H
+#define MBEDTLS_SHA512_H
-#if !defined(POLARSSL_CONFIG_FILE)
+#if !defined(MBEDTLS_CONFIG_FILE)
#include "config.h"
#else
-#include POLARSSL_CONFIG_FILE
+#include MBEDTLS_CONFIG_FILE
#endif
#include <stddef.h>
@@ -38,9 +38,9 @@
#include <inttypes.h>
#endif
-#define POLARSSL_ERR_SHA512_FILE_IO_ERROR -0x007A /**< Read/write error in file. */
+#define MBEDTLS_ERR_SHA512_FILE_IO_ERROR -0x007A /**< Read/write error in file. */
-#if !defined(POLARSSL_SHA512_ALT)
+#if !defined(MBEDTLS_SHA512_ALT)
// Regular implementation
//
@@ -58,21 +58,21 @@
unsigned char buffer[128]; /*!< data block being processed */
int is384; /*!< 0 => SHA-512, else SHA-384 */
}
-sha512_context;
+mbedtls_sha512_context;
/**
* \brief Initialize SHA-512 context
*
* \param ctx SHA-512 context to be initialized
*/
-void sha512_init( sha512_context *ctx );
+void mbedtls_sha512_init( mbedtls_sha512_context *ctx );
/**
* \brief Clear SHA-512 context
*
* \param ctx SHA-512 context to be cleared
*/
-void sha512_free( sha512_context *ctx );
+void mbedtls_sha512_free( mbedtls_sha512_context *ctx );
/**
* \brief SHA-512 context setup
@@ -80,7 +80,7 @@
* \param ctx context to be initialized
* \param is384 0 = use SHA512, 1 = use SHA384
*/
-void sha512_starts( sha512_context *ctx, int is384 );
+void mbedtls_sha512_starts( mbedtls_sha512_context *ctx, int is384 );
/**
* \brief SHA-512 process buffer
@@ -89,7 +89,7 @@
* \param input buffer holding the data
* \param ilen length of the input data
*/
-void sha512_update( sha512_context *ctx, const unsigned char *input,
+void mbedtls_sha512_update( mbedtls_sha512_context *ctx, const unsigned char *input,
size_t ilen );
/**
@@ -98,15 +98,15 @@
* \param ctx SHA-512 context
* \param output SHA-384/512 checksum result
*/
-void sha512_finish( sha512_context *ctx, unsigned char output[64] );
+void mbedtls_sha512_finish( mbedtls_sha512_context *ctx, unsigned char output[64] );
#ifdef __cplusplus
}
#endif
-#else /* POLARSSL_SHA512_ALT */
+#else /* MBEDTLS_SHA512_ALT */
#include "sha512_alt.h"
-#endif /* POLARSSL_SHA512_ALT */
+#endif /* MBEDTLS_SHA512_ALT */
#ifdef __cplusplus
extern "C" {
@@ -120,7 +120,7 @@
* \param output SHA-384/512 checksum result
* \param is384 0 = use SHA512, 1 = use SHA384
*/
-void sha512( const unsigned char *input, size_t ilen,
+void mbedtls_sha512( const unsigned char *input, size_t ilen,
unsigned char output[64], int is384 );
/**
@@ -130,22 +130,22 @@
* \param output SHA-384/512 checksum result
* \param is384 0 = use SHA512, 1 = use SHA384
*
- * \return 0 if successful, or POLARSSL_ERR_SHA512_FILE_IO_ERROR
+ * \return 0 if successful, or MBEDTLS_ERR_SHA512_FILE_IO_ERROR
*/
-int sha512_file( const char *path, unsigned char output[64], int is384 );
+int mbedtls_sha512_file( const char *path, unsigned char output[64], int is384 );
/**
* \brief Checkup routine
*
* \return 0 if successful, or 1 if the test failed
*/
-int sha512_self_test( int verbose );
+int mbedtls_sha512_self_test( int verbose );
/* Internal use */
-void sha512_process( sha512_context *ctx, const unsigned char data[128] );
+void mbedtls_sha512_process( mbedtls_sha512_context *ctx, const unsigned char data[128] );
#ifdef __cplusplus
}
#endif
-#endif /* sha512.h */
+#endif /* mbedtls_sha512.h */