The Great Renaming
A simple execution of tmp/invoke-rename.pl
diff --git a/library/padlock.c b/library/padlock.c
index c6e7bf9..3e9f9a9 100644
--- a/library/padlock.c
+++ b/library/padlock.c
@@ -26,24 +26,24 @@
* programming_guide.pdf
*/
-#if !defined(POLARSSL_CONFIG_FILE)
+#if !defined(MBEDTLS_CONFIG_FILE)
#include "mbedtls/config.h"
#else
-#include POLARSSL_CONFIG_FILE
+#include MBEDTLS_CONFIG_FILE
#endif
-#if defined(POLARSSL_PADLOCK_C)
+#if defined(MBEDTLS_PADLOCK_C)
#include "mbedtls/padlock.h"
#include <string.h>
-#if defined(POLARSSL_HAVE_X86)
+#if defined(MBEDTLS_HAVE_X86)
/*
* PadLock detection routine
*/
-int padlock_supports( int feature )
+int mbedtls_padlock_supports( int feature )
{
static int flags = -1;
int ebx = 0, edx = 0;
@@ -74,7 +74,7 @@
/*
* PadLock AES-ECB block en(de)cryption
*/
-int padlock_xcryptecb( aes_context *ctx,
+int mbedtls_padlock_xcryptecb( mbedtls_aes_context *ctx,
int mode,
const unsigned char input[16],
unsigned char output[16] )
@@ -86,7 +86,7 @@
unsigned char buf[256];
rk = ctx->rk;
- blk = PADLOCK_ALIGN16( buf );
+ blk = MBEDTLS_PADLOCK_ALIGN16( buf );
memcpy( blk, input, 16 );
ctrl = blk + 4;
@@ -114,7 +114,7 @@
/*
* PadLock AES-CBC buffer en(de)cryption
*/
-int padlock_xcryptcbc( aes_context *ctx,
+int mbedtls_padlock_xcryptcbc( mbedtls_aes_context *ctx,
int mode,
size_t length,
unsigned char iv[16],
@@ -130,10 +130,10 @@
if( ( (long) input & 15 ) != 0 ||
( (long) output & 15 ) != 0 )
- return( POLARSSL_ERR_PADLOCK_DATA_MISALIGNED );
+ return( MBEDTLS_ERR_PADLOCK_DATA_MISALIGNED );
rk = ctx->rk;
- iw = PADLOCK_ALIGN16( buf );
+ iw = MBEDTLS_PADLOCK_ALIGN16( buf );
memcpy( iw, iv, 16 );
ctrl = iw + 4;
@@ -162,6 +162,6 @@
return( 0 );
}
-#endif /* POLARSSL_HAVE_X86 */
+#endif /* MBEDTLS_HAVE_X86 */
-#endif /* POLARSSL_PADLOCK_C */
+#endif /* MBEDTLS_PADLOCK_C */