diff --git a/pgpy/constants.py b/pgpy/constants.py index 983916d..fde8335 100644 --- a/pgpy/constants.py +++ b/pgpy/constants.py @@ -16,6 +16,7 @@ from pyasn1.type.univ import ObjectIdentifier from cryptography.hazmat.backends import openssl from cryptography.hazmat.primitives.asymmetric import ec from cryptography.hazmat.primitives.ciphers import algorithms +from cryptography.hazmat.decrepit.ciphers import algorithms as algorithms_n from .types import FlagEnum from .decorators import classproperty @@ -188,10 +189,10 @@ class SymmetricKeyAlgorithm(IntEnum): @property def cipher(self): - bs = {SymmetricKeyAlgorithm.IDEA: algorithms.IDEA, - SymmetricKeyAlgorithm.TripleDES: algorithms.TripleDES, - SymmetricKeyAlgorithm.CAST5: algorithms.CAST5, - SymmetricKeyAlgorithm.Blowfish: algorithms.Blowfish, + bs = {SymmetricKeyAlgorithm.IDEA: algorithms_n.IDEA, + SymmetricKeyAlgorithm.TripleDES: algorithms_n.TripleDES, + SymmetricKeyAlgorithm.CAST5: algorithms_n.CAST5, + SymmetricKeyAlgorithm.Blowfish: algorithms_n.Blowfish, SymmetricKeyAlgorithm.AES128: algorithms.AES, SymmetricKeyAlgorithm.AES192: algorithms.AES, SymmetricKeyAlgorithm.AES256: algorithms.AES,