X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/disorder/blobdiff_plain/1c0d78bd318594a3ec6b35a9b7015c010c48ffc2..ccf0aafa12134bad479faffbf56b2bc4b3e55b82:/lib/authhash.c diff --git a/lib/authhash.c b/lib/authhash.c index a1012ba..b97204d 100644 --- a/lib/authhash.c +++ b/lib/authhash.c @@ -17,6 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ +/** @file lib/authhash.c @brief The authorization hash */ #include #include "types.h" @@ -30,9 +31,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;