def test_register_duplicate_cipher_adapter(self):
     from cryptography.hazmat.backends.commoncrypto.backend import backend
     with pytest.raises(ValueError):
         backend._register_cipher_adapter(
             AES, backend._lib.kCCAlgorithmAES128,
             CBC, backend._lib.kCCModeCBC
         )
Example #2
0
 def test_register_duplicate_cipher_adapter(self):
     from cryptography.hazmat.backends.commoncrypto.backend import backend
     with pytest.raises(ValueError):
         backend._register_cipher_adapter(
             AES, backend._lib.kCCAlgorithmAES128,
             CBC, backend._lib.kCCModeCBC
         )