diff options
-rw-r--r-- | cryptography/hazmat/primitives/ciphers/algorithms.py | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/cryptography/hazmat/primitives/ciphers/algorithms.py b/cryptography/hazmat/primitives/ciphers/algorithms.py index 1ed487b6..75a87265 100644 --- a/cryptography/hazmat/primitives/ciphers/algorithms.py +++ b/cryptography/hazmat/primitives/ciphers/algorithms.py @@ -13,10 +13,11 @@ from __future__ import absolute_import, division, print_function +from cryptography import utils from cryptography.hazmat.primitives import interfaces -@interfaces.register(interfaces.CipherAlgorithm) +@utils.register_interface(interfaces.CipherAlgorithm) class AES(object): name = "AES" block_size = 128 @@ -36,7 +37,7 @@ class AES(object): return len(self.key) * 8 -@interfaces.register(interfaces.CipherAlgorithm) +@utils.register_interface(interfaces.CipherAlgorithm) class Camellia(object): name = "camellia" block_size = 128 @@ -56,7 +57,7 @@ class Camellia(object): return len(self.key) * 8 -@interfaces.register(interfaces.CipherAlgorithm) +@utils.register_interface(interfaces.CipherAlgorithm) class TripleDES(object): name = "3DES" block_size = 64 @@ -80,7 +81,7 @@ class TripleDES(object): return len(self.key) * 8 -@interfaces.register(interfaces.CipherAlgorithm) +@utils.register_interface(interfaces.CipherAlgorithm) class Blowfish(object): name = "Blowfish" block_size = 64 @@ -100,7 +101,7 @@ class Blowfish(object): return len(self.key) * 8 -@interfaces.register(interfaces.CipherAlgorithm) +@utils.register_interface(interfaces.CipherAlgorithm) class CAST5(object): name = "CAST5" block_size = 64 @@ -120,7 +121,7 @@ class CAST5(object): return len(self.key) * 8 -@interfaces.register(interfaces.CipherAlgorithm) +@utils.register_interface(interfaces.CipherAlgorithm) class ARC4(object): name = "RC4" block_size = 1 |