(self, key, msg, digestmod)
| 77 | self.__init(key, msg, digestmod) |
| 78 | |
| 79 | def __init(self, key, msg, digestmod): |
| 80 | if _hashopenssl and isinstance(digestmod, (str, _functype)): |
| 81 | try: |
| 82 | self._init_openssl_hmac(key, msg, digestmod) |
| 83 | return |
| 84 | except _hashopenssl.UnsupportedDigestmodError: # pragma: no cover |
| 85 | pass |
| 86 | if _hmac and isinstance(digestmod, str): |
| 87 | try: |
| 88 | self._init_builtin_hmac(key, msg, digestmod) |
| 89 | return |
| 90 | except _hmac.UnknownHashError: # pragma: no cover |
| 91 | pass |
| 92 | self._init_old(key, msg, digestmod) |
| 93 | |
| 94 | def _init_openssl_hmac(self, key, msg, digestmod): |
| 95 | self._hmac = _hashopenssl.hmac_new(key, msg, digestmod=digestmod) |
no test coverage detected