Expand description
HTTP Digest access authentication (RFC 2617) โ hand-rolled for HikVision ISAPI.
The flow lives in the service layer: send a request unauthenticated, and on 401 read the
WWW-Authenticate header, build an Authorization: Digest ... header with
digest_auth_header, and retry once. The MD5 hashing uses the md-5 crate; the client nonce
is drawn from the OS CSPRNG (mirroring auth.rs / services/onvif.rs).
Functionsยง
- digest_
auth_ header - Compute an HTTP Digest
Authorizationheader formethod+urigiven aWWW-Authenticatechallenge. ReturnsNonewhen the challenge lacks the requiredrealm/nonce. When the server offersqop=auth, a fresh client nonce (cnonce) is generated andncis00000001.