Alternative implementation of hmac_digest(). Unlike hmac_digest(), this method may assert the type of 'hashname' as it should only be used in tests that are expected to compute a HMAC digest.
(self, key, msg=None, *, hashname)
| 223 | return self.hmac_new(key, msg, digestmod=hashname) |
| 224 | |
| 225 | def hmac_digest_by_name(self, key, msg=None, *, hashname): |
| 226 | """Alternative implementation of hmac_digest(). |
| 227 | |
| 228 | Unlike hmac_digest(), this method may assert the type of 'hashname' |
| 229 | as it should only be used in tests that are expected to compute a |
| 230 | HMAC digest. |
| 231 | """ |
| 232 | self.assertIsInstance(hashname, str) |
| 233 | return self.hmac_digest(key, msg, digestmod=hashname) |
| 234 | |
| 235 | def assert_hmac( |
| 236 | self, key, msg, hexdigest, hashfunc, hashname, digest_size, block_size |
nothing calls this directly
no test coverage detected