I'm not sure I understand the question.
If you tell libcurl to use digest (with CURLOPT_HTTPAUTH) and you give it your username and password, it will parse the 401 response and send the second request correctly and thus request the resource as RFC2617 dictates digest should be done!
It is however not possible to just somehow call libcurl's internal digest-functions to do the work "on your own" with the help of libcurl's digest logic.