summary refs log tree commit diff stats
path: root/src/common/util.c
diff options
context:
space:
mode:
authorBerke Viktor <bviktor@hexchat.org>2013-05-20 12:38:50 +0200
committerBerke Viktor <bviktor@hexchat.org>2013-05-20 12:38:50 +0200
commit1432ecfb33654bba46fd55cad3527a4f7a1e82f5 (patch)
tree6f72fe455265189332951e026c690540e8dc9e65 /src/common/util.c
parent341cfbb527e7a566d146b1b4dcdae286f9b530ef (diff)
Sample code docs for challengeauth_response()
Diffstat (limited to 'src/common/util.c')
-rw-r--r--src/common/util.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/common/util.c b/src/common/util.c
index 9e9cb594..52464621 100644
--- a/src/common/util.c
+++ b/src/common/util.c
@@ -1997,6 +1997,21 @@ str_sha256hash (char *string)
 	return g_strdup (buf);
 }
 
+/**
+ * \brief Generate CHALLENGEAUTH response for QuakeNet login.
+ *
+ * \param username QuakeNet user name
+ * \param password password for the user
+ * \param challenge the CHALLENGE response we got from Q
+ *
+ * After a successful connection to QuakeNet a CHALLENGE is requested from Q.
+ * Generate the CHALLENGEAUTH response from this CHALLENGE and our user
+ * credentials as per the
+ * <a href="http://www.quakenet.org/development/challengeauth">CHALLENGEAUTH</a>
+ * docs. As for using OpenSSL HMAC, see
+ * <a href="http://www.askyb.com/cpp/openssl-hmac-hasing-example-in-cpp/">example 1</a>,
+ * <a href="http://stackoverflow.com/questions/242665/understanding-engine-initialization-in-openssl">example 2</a>.
+ */
 char *
 challengeauth_response (char *username, char *password, char *challenge)
 {