Hello,

I'm making some high level classes for handling a12n with MHD, but I have
some questions about the example digest_auth_example.c
<https://gnunet.org/svn/libmicrohttpd/src/examples/digest_auth_example.c>,
that implements the digest a12n and I'm unsing this one to understand how
MHD handles a12n. Questions:

1. Does opaque string need to be static?

#define MY_OPAQUE_STR "11733b200778ce33060f31c9af70a870ba96ddd4"

The value above seems a md5 hash, but I don't know what was hashed.

2. Do I always need to use MHD_OPTION_DIGEST_AUTH_RANDOM and
MHD_OPTION_NONCE_NC_SIZE?

I commented the lines:

MHD_OPTION_DIGEST_AUTH_RANDOM, sizeof(rnd), rnd,
MHD_OPTION_NONCE_NC_SIZE, 300,

and the demo still working. So, what really does this lines?

3. Can I use any hash for the random string?

The example uses the "/dev/urandom" feature, but I need to make a
cross-platform solution, so can I use a hash like a UUID (I can generate it
using a own function) instead of using urandom?

-- 
Silvio Clécio

Reply via email to