X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/disorder/blobdiff_plain/74a94bd06358ca24b4a3a1acaa524c7235f38664..d7b6f0d1cda54fe872145ab6ee20bf5bc131be8d:/lib/authhash.c?ds=sidebyside diff --git a/lib/authhash.c b/lib/authhash.c index a1012ba..5c66c01 100644 --- a/lib/authhash.c +++ b/lib/authhash.c @@ -30,9 +30,19 @@ #include "authhash.h" #ifndef AUTHHASH +/** @brief Which hash function to use */ # define AUTHHASH GCRY_MD_SHA1 #endif +/** @brief Perform the authorization hash function + * @param challenge Pointer to challange + * @param nchallenge Size of challenge + * @param password Password + * + * Computes H(challenge|password) and returns it as a newly allocated hex + * string. Currently the hash function is SHA-1, but this may be changed in + * future versions; see @ref AUTHHASH. + */ const char *authhash(const void *challenge, size_t nchallenge, const char *password) { gcrypt_hash_handle h;