Browse Source

[trac782] set the unknown hash algorithm enum value to 0, avoid that each time we add new alogirthm, we have to modify the it since it is the last one

feng 14 years ago
parent
commit
a1420dabc6
1 changed files with 8 additions and 8 deletions
  1. 8 8
      src/lib/cryptolink/cryptolink.h

+ 8 - 8
src/lib/cryptolink/cryptolink.h

@@ -29,19 +29,19 @@ namespace cryptolink {
 
 /// \brief Hash algorithm identifiers
 enum HashAlgorithm {
-    MD5 = 0,            ///< MD5
-    SHA1 = 1,           ///< SHA-1
-    SHA256 = 2,         ///< SHA-256
-    SHA224 = 3,         ///< SHA-224
-    SHA384 = 4,         ///< SHA-384
-    SHA512 = 5,         ///< SHA-512
-
-    UNKNOWN_HASH = 6    ///< This value can be used in conversion
+    UNKNOWN_HASH = 0,   ///< This value can be used in conversion
                         ///  functions, to be returned when the
                         ///  input is unknown (but a value MUST be
                         ///  returned), for instance when the input
                         ///  is a Name or a string, and the return
                         ///  value is a HashAlgorithm.
+    MD5 = 1,            ///< MD5
+    SHA1 = 2,           ///< SHA-1
+    SHA256 = 3,         ///< SHA-256
+    SHA224 = 4,         ///< SHA-224
+    SHA384 = 5,         ///< SHA-384
+    SHA512 = 6          ///< SHA-512
+
 };
 
 // Forward declaration for createHMAC()