(self, nonce_count: int, nonce: bytes)
| 301 | return "Digest " + self._get_header_value(format_args) |
| 302 | |
| 303 | def _get_client_nonce(self, nonce_count: int, nonce: bytes) -> bytes: |
| 304 | s = str(nonce_count).encode() |
| 305 | s += nonce |
| 306 | s += time.ctime().encode() |
| 307 | s += os.urandom(8) |
| 308 | |
| 309 | return hashlib.sha1(s).hexdigest()[:16].encode() |
| 310 | |
| 311 | def _get_header_value(self, header_fields: dict[str, bytes]) -> str: |
| 312 | NON_QUOTED_FIELDS = ("algorithm", "qop", "nc") |