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

Method create_alg

Lib/test/test_socket.py:7088–7097  ·  view source on GitHub ↗
(self, typ, name)

Source from the content-addressed store, hash-verified

7086class LinuxKernelCryptoAPI(unittest.TestCase):
7087 # tests for AF_ALG
7088 def create_alg(self, typ, name):
7089 sock = socket.socket(socket.AF_ALG, socket.SOCK_SEQPACKET, 0)
7090 try:
7091 sock.bind((typ, name))
7092 except FileNotFoundError as e:
7093 # type / algorithm is not available
7094 sock.close()
7095 raise unittest.SkipTest(str(e), typ, name)
7096 else:
7097 return sock
7098
7099 # bpo-31705: On kernel older than 4.5, sendto() failed with ENOKEY,
7100 # at least on ppc64le architecture

Callers 5

test_sha256Method · 0.95
test_hmac_sha1Method · 0.95
test_aes_cbcMethod · 0.95
test_aead_aes_gcmMethod · 0.95
test_drbg_pr_sha256Method · 0.95

Calls 4

strFunction · 0.85
socketMethod · 0.80
bindMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected