fixed big endian bug in md5 hasher
[strongswan.git] / src / libstrongswan / crypto / hashers / hasher.c
index 444486f..7fa6346 100644 (file)
 #include <crypto/hashers/sha2_hasher.h>
 #include <crypto/hashers/md5_hasher.h>
 
-/**
- * String mappings for hash_algorithm_t.
- */
-mapping_t hash_algorithm_m[] = {
-       {HASH_MD2,"HASH_MD2"},
-       {HASH_MD5,"HASH_MD5"},
-       {HASH_SHA1,"HASH_SHA1"},
-       {HASH_SHA256,"HASH_SHA256"},
-       {HASH_SHA384,"HASH_SHA384"},
-       {HASH_SHA512,"HASH_SHA512"},
-       {MAPPING_END, NULL}
-};
+
+ENUM(hash_algorithm_names, HASH_MD2, HASH_SHA512,
+       "HASH_MD2",
+       "HASH_MD5",
+       "HASH_SHA1",
+       "HASH_SHA256",
+       "HASH_SHA384",
+       "HASH_SHA512"
+);
 
 /*
  * Described in header.