diff options
author | Alex Gaynor <alex.gaynor@gmail.com> | 2013-11-18 13:27:05 -0800 |
---|---|---|
committer | Alex Gaynor <alex.gaynor@gmail.com> | 2013-11-18 13:27:05 -0800 |
commit | 36bb5072ca6475a9bb9610b003945fd468d3a057 (patch) | |
tree | 08512317ebee9a8155e3cd3854ca1fc7eedc7442 /cryptography/hazmat/primitives/ciphers/algorithms.py | |
parent | 984eeeb388e79db6354efd884e0f5d8b7b069560 (diff) | |
parent | dcf62db81ad60b3591ae6d83dce43c311a347ac2 (diff) | |
download | cryptography-36bb5072ca6475a9bb9610b003945fd468d3a057.tar.gz cryptography-36bb5072ca6475a9bb9610b003945fd468d3a057.tar.bz2 cryptography-36bb5072ca6475a9bb9610b003945fd468d3a057.zip |
Merge pull request #270 from dreid/register-to-utils-register_interface
Move interfaces.register to utils.register_interface in preparation for more interface modules.
Diffstat (limited to 'cryptography/hazmat/primitives/ciphers/algorithms.py')
-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 |