digcalc.h | |
Functions | |
CvtHex | Convert hash value to hexa string |
DigestCalcHA1 | Calculate HA1 as defined in HTTP digest specification |
DigestCalcResponse | Calculate request-digest/response-digest as defined in HTTP Digest specification |
Calculate HA1 as defined in HTTP digest specification
pszAlg | in charstring - a string indicating a pair of algorithms used to produce the digest and a checksum |
pszUserName | in charstring - user name |
pszRealm | in charstring - user realm |
pszPassword | in charstring - user password |
pszpwdlen | in integer - lenght of the user password |
pszNonce | in charstring - a server-specified data string which may be uniquely generated each time a 401 response is made |
pszCNonce | in charstring - client nonce |
SessionKey | out <HASHHEX> - HEXA value of hash HA1 |
-
-
HA1 = MD5(A1) = MD5(username:realm:password)
HA1 = MD5(HA1:nonce:cNonce)
Calculate request-digest/response-digest as defined in HTTP Digest specification
pszNonce | in charstring - nonce |
pszNonceCount | in charstring - nonce count |
pszCNonce | in charstring - client nonce |
pszQop | in charstring - qop-value: “”, “auth”, “auth-int” |
pszMethod | in charstring - method (from the request) |
pszDigestUri | in charstring - digest URI |
HEntity | in charstring - H(entity body) if qop=”auth-int” |
Response | out <HASHHEX> - HEXA Digest response |
-
-
Default: HA2 = MD5(A2) = MD5(method:digestURI)
HA2 = MD5(method:digestURI:HEntity)
Default: response = MD5(HA1:nonce)
response = MD5(HA1:nonce:nonceCount:cNonce:Qop:HA2)