We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4a41c53 commit 926fa7fCopy full SHA for 926fa7f
pypdf/_crypt_providers/_cryptography.py
@@ -29,7 +29,13 @@
29
30
from cryptography import __version__
31
from cryptography.hazmat.primitives import padding
32
-from cryptography.hazmat.primitives.ciphers.algorithms import AES, ARC4
+from cryptography.hazmat.primitives.ciphers.algorithms import AES
33
+
34
+try:
35
+ # 43.0.0 - https://cryptography.io/en/latest/changelog/#v43-0-0
36
+ from cryptography.hazmat.decrepit.ciphers.algorithms import ARC4
37
+except ImportError:
38
+ from cryptography.hazmat.primitives.ciphers.algorithms import ARC4
39
from cryptography.hazmat.primitives.ciphers.base import Cipher
40
from cryptography.hazmat.primitives.ciphers.modes import CBC, ECB
41
0 commit comments