1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-07-29 11:41:15 +03:00

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.
This commit is contained in:
Paul Bakker
2013-06-30 14:34:05 +02:00
parent 3866b9f4b5
commit 9e36f0475f
32 changed files with 700 additions and 697 deletions

View File

@ -58,12 +58,12 @@ static const int supported_digests[] = {
POLARSSL_MD_SHA1,
#endif
#if defined(POLARSSL_SHA2_C)
#if defined(POLARSSL_SHA256_C)
POLARSSL_MD_SHA224,
POLARSSL_MD_SHA256,
#endif
#if defined(POLARSSL_SHA4_C)
#if defined(POLARSSL_SHA512_C)
POLARSSL_MD_SHA384,
POLARSSL_MD_SHA512,
#endif
@ -98,13 +98,13 @@ const md_info_t *md_info_from_string( const char *md_name )
if( !strcasecmp( "SHA1", md_name ) || !strcasecmp( "SHA", md_name ) )
return md_info_from_type( POLARSSL_MD_SHA1 );
#endif
#if defined(POLARSSL_SHA2_C)
#if defined(POLARSSL_SHA256_C)
if( !strcasecmp( "SHA224", md_name ) )
return md_info_from_type( POLARSSL_MD_SHA224 );
if( !strcasecmp( "SHA256", md_name ) )
return md_info_from_type( POLARSSL_MD_SHA256 );
#endif
#if defined(POLARSSL_SHA4_C)
#if defined(POLARSSL_SHA512_C)
if( !strcasecmp( "SHA384", md_name ) )
return md_info_from_type( POLARSSL_MD_SHA384 );
if( !strcasecmp( "SHA512", md_name ) )
@ -133,13 +133,13 @@ const md_info_t *md_info_from_type( md_type_t md_type )
case POLARSSL_MD_SHA1:
return &sha1_info;
#endif
#if defined(POLARSSL_SHA2_C)
#if defined(POLARSSL_SHA256_C)
case POLARSSL_MD_SHA224:
return &sha224_info;
case POLARSSL_MD_SHA256:
return &sha256_info;
#endif
#if defined(POLARSSL_SHA4_C)
#if defined(POLARSSL_SHA512_C)
case POLARSSL_MD_SHA384:
return &sha384_info;
case POLARSSL_MD_SHA512: