MCPcopy Index your code
hub / github.com/RustPython/RustPython / create_alg

Method create_alg

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

Source from the content-addressed store, hash-verified

6991class LinuxKernelCryptoAPI(unittest.TestCase):
6992 # tests for AF_ALG
6993 def create_alg(self, typ, name):
6994 sock = socket.socket(socket.AF_ALG, socket.SOCK_SEQPACKET, 0)
6995 try:
6996 sock.bind((typ, name))
6997 except FileNotFoundError as e:
6998 # type / algorithm is not available
6999 sock.close()
7000 raise unittest.SkipTest(str(e), typ, name)
7001 else:
7002 return sock
7003
7004 # bpo-31705: On kernel older than 4.5, sendto() failed with ENOKEY,
7005 # 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