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

Method check_openssl_hash

Lib/test/test_support.py:906–913  ·  view source on GitHub ↗

Check that OpenSSL HASH interface is enabled/disabled.

(self, name, *, disabled=True)

Source from the content-addressed store, hash-verified

904 return target.import_member()
905
906 def check_openssl_hash(self, name, *, disabled=True):
907 """Check that OpenSSL HASH interface is enabled/disabled."""
908 with self.check_context(disabled):
909 _ = self._hashlib.new(name)
910 if do_hash := self.fetch_hash_function(name, "openssl"):
911 self.assertStartsWith(do_hash.__name__, 'openssl_')
912 with self.check_context(disabled):
913 _ = do_hash(b"")
914
915 def check_openssl_hmac(self, name, *, disabled=True):
916 """Check that OpenSSL HMAC interface is enabled/disabled."""

Callers 1

test_disable_hashMethod · 0.95

Calls 4

check_contextMethod · 0.95
fetch_hash_functionMethod · 0.95
assertStartsWithMethod · 0.80
newMethod · 0.45

Tested by

no test coverage detected