(self, nonce)
| 1105 | return resp |
| 1106 | |
| 1107 | def get_cnonce(self, nonce): |
| 1108 | # The cnonce-value is an opaque |
| 1109 | # quoted string value provided by the client and used by both client |
| 1110 | # and server to avoid chosen plaintext attacks, to provide mutual |
| 1111 | # authentication, and to provide some message integrity protection. |
| 1112 | # This isn't a fabulous effort, but it's probably Good Enough. |
| 1113 | s = "%s:%s:%s:" % (self.nonce_count, nonce, time.ctime()) |
| 1114 | b = s.encode("ascii") + _randombytes(8) |
| 1115 | dig = hashlib.sha1(b).hexdigest() |
| 1116 | return dig[:16] |
| 1117 | |
| 1118 | def get_authorization(self, req, chal): |
| 1119 | try: |
no test coverage detected