From 565d78b9085304caf198f908a3ff3b151f1e5b7d Mon Sep 17 00:00:00 2001 From: craftin Date: Wed, 11 Feb 2026 15:20:56 +0300 Subject: [PATCH] updated cryptography deprecated things --- pgpy/constants.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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,