(self, key, msg, digestmod)
| 87 | self.__init(key, msg, digestmod) |
| 88 | |
| 89 | def __init(self, key, msg, digestmod): |
| 90 | if _hashopenssl and isinstance(digestmod, (str, _functype)): |
| 91 | try: |
| 92 | self._init_openssl_hmac(key, msg, digestmod) |
| 93 | return |
| 94 | except _hashopenssl.UnsupportedDigestmodError: # pragma: no cover |
| 95 | pass |
| 96 | if _hmac and isinstance(digestmod, str): |
| 97 | try: |
| 98 | self._init_builtin_hmac(key, msg, digestmod) |
| 99 | return |
| 100 | except _hmac.UnknownHashError: # pragma: no cover |
| 101 | pass |
| 102 | self._init_old(key, msg, digestmod) |
| 103 | |
| 104 | def _init_openssl_hmac(self, key, msg, digestmod): |
| 105 | self._hmac = _hashopenssl.hmac_new(key, msg, digestmod=digestmod) |
no test coverage detected