Add short names for hasher algorithms
authorMartin Willi <martin@revosec.ch>
Tue, 17 Jul 2012 13:35:02 +0000 (15:35 +0200)
committerMartin Willi <martin@revosec.ch>
Tue, 17 Jul 2012 15:31:55 +0000 (17:31 +0200)
src/libstrongswan/crypto/hashers/hasher.c
src/libstrongswan/crypto/hashers/hasher.h

index e0a4995..dc73d52 100644 (file)
@@ -32,6 +32,19 @@ ENUM(hash_algorithm_names, HASH_UNKNOWN, HASH_SHA512,
        "HASH_SHA512"
 );
 
        "HASH_SHA512"
 );
 
+ENUM(hash_algorithm_short_names, HASH_UNKNOWN, HASH_SHA512,
+       "unknown",
+       "preferred",
+       "md2",
+       "md4",
+       "md5",
+       "sha1",
+       "sha224",
+       "sha256",
+       "sha384",
+       "sha512"
+);
+
 /*
  * Described in header.
  */
 /*
  * Described in header.
  */
index 2685d44..fa5ff69 100644 (file)
@@ -64,6 +64,11 @@ enum hash_algorithm_t {
 extern enum_name_t *hash_algorithm_names;
 
 /**
 extern enum_name_t *hash_algorithm_names;
 
 /**
+ * Short names for hash_algorithm_names
+ */
+extern enum_name_t *hash_algorithm_short_names;
+
+/**
  * Generic interface for all hash functions.
  */
 struct hasher_t {
  * Generic interface for all hash functions.
  */
 struct hasher_t {