I'm making some high level classes for handling a12n with MHD, but I have some questions about the example 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?
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,
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?