The Great Renaming
A simple execution of tmp/invoke-rename.pl
diff --git a/include/mbedtls/sha1.h b/include/mbedtls/sha1.h
index 3978883..448c272 100644
--- a/include/mbedtls/sha1.h
+++ b/include/mbedtls/sha1.h
@@ -1,5 +1,5 @@
/**
- * \file sha1.h
+ * \file mbedtls_sha1.h
*
* \brief SHA-1 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_SHA1_H
-#define POLARSSL_SHA1_H
+#ifndef MBEDTLS_SHA1_H
+#define MBEDTLS_SHA1_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>
@@ -39,9 +39,9 @@
#include <inttypes.h>
#endif
-#define POLARSSL_ERR_SHA1_FILE_IO_ERROR -0x0076 /**< Read/write error in file. */
+#define MBEDTLS_ERR_SHA1_FILE_IO_ERROR -0x0076 /**< Read/write error in file. */
-#if !defined(POLARSSL_SHA1_ALT)
+#if !defined(MBEDTLS_SHA1_ALT)
// Regular implementation
//
@@ -58,28 +58,28 @@
uint32_t state[5]; /*!< intermediate digest state */
unsigned char buffer[64]; /*!< data block being processed */
}
-sha1_context;
+mbedtls_sha1_context;
/**
* \brief Initialize SHA-1 context
*
* \param ctx SHA-1 context to be initialized
*/
-void sha1_init( sha1_context *ctx );
+void mbedtls_sha1_init( mbedtls_sha1_context *ctx );
/**
* \brief Clear SHA-1 context
*
* \param ctx SHA-1 context to be cleared
*/
-void sha1_free( sha1_context *ctx );
+void mbedtls_sha1_free( mbedtls_sha1_context *ctx );
/**
* \brief SHA-1 context setup
*
* \param ctx context to be initialized
*/
-void sha1_starts( sha1_context *ctx );
+void mbedtls_sha1_starts( mbedtls_sha1_context *ctx );
/**
* \brief SHA-1 process buffer
@@ -88,7 +88,7 @@
* \param input buffer holding the data
* \param ilen length of the input data
*/
-void sha1_update( sha1_context *ctx, const unsigned char *input, size_t ilen );
+void mbedtls_sha1_update( mbedtls_sha1_context *ctx, const unsigned char *input, size_t ilen );
/**
* \brief SHA-1 final digest
@@ -96,18 +96,18 @@
* \param ctx SHA-1 context
* \param output SHA-1 checksum result
*/
-void sha1_finish( sha1_context *ctx, unsigned char output[20] );
+void mbedtls_sha1_finish( mbedtls_sha1_context *ctx, unsigned char output[20] );
/* Internal use */
-void sha1_process( sha1_context *ctx, const unsigned char data[64] );
+void mbedtls_sha1_process( mbedtls_sha1_context *ctx, const unsigned char data[64] );
#ifdef __cplusplus
}
#endif
-#else /* POLARSSL_SHA1_ALT */
+#else /* MBEDTLS_SHA1_ALT */
#include "sha1_alt.h"
-#endif /* POLARSSL_SHA1_ALT */
+#endif /* MBEDTLS_SHA1_ALT */
#ifdef __cplusplus
extern "C" {
@@ -120,7 +120,7 @@
* \param ilen length of the input data
* \param output SHA-1 checksum result
*/
-void sha1( const unsigned char *input, size_t ilen, unsigned char output[20] );
+void mbedtls_sha1( const unsigned char *input, size_t ilen, unsigned char output[20] );
/**
* \brief Output = SHA-1( file contents )
@@ -128,19 +128,19 @@
* \param path input file name
* \param output SHA-1 checksum result
*
- * \return 0 if successful, or POLARSSL_ERR_SHA1_FILE_IO_ERROR
+ * \return 0 if successful, or MBEDTLS_ERR_SHA1_FILE_IO_ERROR
*/
-int sha1_file( const char *path, unsigned char output[20] );
+int mbedtls_sha1_file( const char *path, unsigned char output[20] );
/**
* \brief Checkup routine
*
* \return 0 if successful, or 1 if the test failed
*/
-int sha1_self_test( int verbose );
+int mbedtls_sha1_self_test( int verbose );
#ifdef __cplusplus
}
#endif
-#endif /* sha1.h */
+#endif /* mbedtls_sha1.h */