|
18 | 18 |
|
19 | 19 | from cryptography import exceptions as errors |
20 | 20 | from cryptography.hazmat.backends import default_backend |
| 21 | +from cryptography.hazmat.decrepit.ciphers import algorithms as new_algorithms |
21 | 22 | from cryptography.hazmat.primitives import serialization, hashes, hmac, cmac |
22 | 23 | from cryptography.hazmat.primitives import padding as symmetric_padding |
23 | 24 | from cryptography.hazmat.primitives.asymmetric import rsa |
@@ -49,13 +50,13 @@ def __init__(self): |
49 | 50 | # The IDEA algorithm is supported by cryptography but may not be |
50 | 51 | # supported by certain backends, like OpenSSL. |
51 | 52 | self._symmetric_key_algorithms = { |
52 | | - enums.CryptographicAlgorithm.TRIPLE_DES: algorithms.TripleDES, |
| 53 | + enums.CryptographicAlgorithm.TRIPLE_DES: new_algorithms.TripleDES, |
53 | 54 | enums.CryptographicAlgorithm.AES: algorithms.AES, |
54 | | - enums.CryptographicAlgorithm.BLOWFISH: algorithms.Blowfish, |
| 55 | + enums.CryptographicAlgorithm.BLOWFISH: new_algorithms.Blowfish, |
55 | 56 | enums.CryptographicAlgorithm.CAMELLIA: algorithms.Camellia, |
56 | | - enums.CryptographicAlgorithm.CAST5: algorithms.CAST5, |
57 | | - enums.CryptographicAlgorithm.IDEA: algorithms.IDEA, |
58 | | - enums.CryptographicAlgorithm.RC4: algorithms.ARC4 |
| 57 | + enums.CryptographicAlgorithm.CAST5: new_algorithms.CAST5, |
| 58 | + enums.CryptographicAlgorithm.IDEA: new_algorithms.IDEA, |
| 59 | + enums.CryptographicAlgorithm.RC4: new_algorithms.ARC4 |
59 | 60 | } |
60 | 61 | self._asymmetric_key_algorithms = { |
61 | 62 | enums.CryptographicAlgorithm.RSA: self._create_rsa_key_pair |
|
0 commit comments