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