SHA2 renamed to SHA256, SHA4 renamed to SHA512 and functions accordingly
The SHA4 name was not clear with regards to the new SHA-3 standard. So
SHA2 and SHA4 have been renamed to better represent what they are:
SHA256 and SHA512 modules.
diff --git a/library/error.c b/library/error.c
index aa0e24e..22a6371 100644
--- a/library/error.c
+++ b/library/error.c
@@ -129,11 +129,11 @@
#include "polarssl/sha1.h"
#endif
-#if defined(POLARSSL_SHA2_C)
+#if defined(POLARSSL_SHA256_C)
#include "polarssl/sha2.h"
#endif
-#if defined(POLARSSL_SHA4_C)
+#if defined(POLARSSL_SHA512_C)
#include "polarssl/sha4.h"
#endif
@@ -594,15 +594,15 @@
snprintf( buf, buflen, "SHA1 - Read/write error in file" );
#endif /* POLARSSL_SHA1_C */
-#if defined(POLARSSL_SHA2_C)
- if( use_ret == -(POLARSSL_ERR_SHA2_FILE_IO_ERROR) )
- snprintf( buf, buflen, "SHA2 - Read/write error in file" );
-#endif /* POLARSSL_SHA2_C */
+#if defined(POLARSSL_SHA256_C)
+ if( use_ret == -(POLARSSL_ERR_SHA256_FILE_IO_ERROR) )
+ snprintf( buf, buflen, "SHA256 - Read/write error in file" );
+#endif /* POLARSSL_SHA256_C */
-#if defined(POLARSSL_SHA4_C)
- if( use_ret == -(POLARSSL_ERR_SHA4_FILE_IO_ERROR) )
- snprintf( buf, buflen, "SHA4 - Read/write error in file" );
-#endif /* POLARSSL_SHA4_C */
+#if defined(POLARSSL_SHA512_C)
+ if( use_ret == -(POLARSSL_ERR_SHA512_FILE_IO_ERROR) )
+ snprintf( buf, buflen, "SHA512 - Read/write error in file" );
+#endif /* POLARSSL_SHA512_C */
#if defined(POLARSSL_XTEA_C)
if( use_ret == -(POLARSSL_ERR_XTEA_INVALID_INPUT_LENGTH) )