chiark / gitweb /
Tree layout and context menu for playlist picker.
[disorder] / lib / authhash.c
index 9d36fefd40124264b27a60b4dcb5263e6916f683..8cc96f904542949d984c5104efe83be04040ff42 100644 (file)
 
 /** @brief Structure of algorithm lookup table */
 struct algorithm {
+  /** @brief DisOrder algorithm name */
   const char *name;
+
+  /** @brief gcrypt algorithm ID */
   int id;
 };
 
@@ -56,6 +59,7 @@ static const struct algorithm algorithms[] = {
  * @param nchallenge Size of challenge
  * @param password Password
  * @param algo Algorithm to use
+ * @return Hex string or NULL on error
  *
  * Computes H(challenge|password) and returns it as a newly allocated hex
  * string, or returns NULL on error.
@@ -81,7 +85,7 @@ const char *authhash(const void *challenge, size_t nchallenge,
     gcry_error_t e;
     
     if((e = gcry_md_open(&h, id, 0))) {
-      error(0, "gcry_md_open: %s", gcry_strerror(e));
+      disorder_error(0, "gcry_md_open: %s", gcry_strerror(e));
       return 0;
     }
   }