MCPcopy Index your code
hub / github.com/python/cpython / check_builtin_hash

Method check_builtin_hash

Lib/test/test_support.py:927–932  ·  view source on GitHub ↗

Check that HACL* HASH interface is enabled/disabled.

(self, name, *, disabled=True)

Source from the content-addressed store, hash-verified

925 # OpenSSL does not provide one-shot explicit HMAC functions
926
927 def check_builtin_hash(self, name, *, disabled=True):
928 """Check that HACL* HASH interface is enabled/disabled."""
929 if do_hash := self.fetch_hash_function(name, "builtin"):
930 self.assertEqual(do_hash.__name__, name)
931 with self.check_context(disabled):
932 _ = do_hash(b"")
933
934 def check_builtin_hmac(self, name, *, disabled=True):
935 """Check that HACL* HMAC interface is enabled/disabled."""

Callers 1

test_disable_hashMethod · 0.95

Calls 3

fetch_hash_functionMethod · 0.95
check_contextMethod · 0.95
assertEqualMethod · 0.45

Tested by

no test coverage detected