hashers: Change names of SHA2 hash algorithms
authorTobias Brunner <tobias@strongswan.org>
Fri, 17 Nov 2017 08:31:19 +0000 (09:31 +0100)
committerTobias Brunner <tobias@strongswan.org>
Fri, 17 Nov 2017 08:32:47 +0000 (09:32 +0100)
Keep the lower case names as they are as we use them internally (parsing
and e.g. in OpenSSL as identifier).

src/libstrongswan/crypto/hashers/hasher.c

index 9f9fcd3..2bd55ad 100644 (file)
 
 ENUM_BEGIN(hash_algorithm_names, HASH_SHA1, HASH_IDENTITY,
        "HASH_SHA1",
-       "HASH_SHA256",
-       "HASH_SHA384",
-       "HASH_SHA512",
+       "HASH_SHA2_256",
+       "HASH_SHA2_384",
+       "HASH_SHA2_512",
        "HASH_IDENTITY");
 ENUM_NEXT(hash_algorithm_names, HASH_UNKNOWN, HASH_SHA3_512, HASH_IDENTITY,
        "HASH_UNKNOWN",
        "HASH_MD2",
        "HASH_MD4",
        "HASH_MD5",
-       "HASH_SHA224",
+       "HASH_SHA2_224",
        "HASH_SHA3_224",
        "HASH_SHA3_256",
        "HASH_SHA3_384",
@@ -59,16 +59,16 @@ ENUM_END(hash_algorithm_short_names, HASH_SHA3_512);
 
 ENUM_BEGIN(hash_algorithm_short_names_upper, HASH_SHA1, HASH_IDENTITY,
        "SHA1",
-       "SHA256",
-       "SHA384",
-       "SHA512",
+       "SHA2_256",
+       "SHA2_384",
+       "SHA2_512",
        "IDENTITY");
 ENUM_NEXT(hash_algorithm_short_names_upper, HASH_UNKNOWN, HASH_SHA3_512, HASH_IDENTITY,
        "UNKNOWN",
        "MD2",
        "MD4",
        "MD5",
-       "SHA224",
+       "SHA2_224",
        "SHA3_224",
        "SHA3_256",
        "SHA3_384",