diff options
author | David Reid <dreid@dreid.org> | 2013-11-15 16:19:50 -0800 |
---|---|---|
committer | David Reid <dreid@dreid.org> | 2013-11-15 16:19:50 -0800 |
commit | 0a394df31c4165d0230843ebea2717b3cd3caafa (patch) | |
tree | 5c674a900d0f7465cde2796b9bba21a87d67b56e /cryptography/hazmat/primitives/ciphers/algorithms.py | |
parent | 9489c769dbd7ea7c6830b5fcd70095818452e607 (diff) | |
download | cryptography-0a394df31c4165d0230843ebea2717b3cd3caafa.tar.gz cryptography-0a394df31c4165d0230843ebea2717b3cd3caafa.tar.bz2 cryptography-0a394df31c4165d0230843ebea2717b3cd3caafa.zip |
Implement and document an interface for cipher algorithms
Diffstat (limited to 'cryptography/hazmat/primitives/ciphers/algorithms.py')
-rw-r--r-- | cryptography/hazmat/primitives/ciphers/algorithms.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/cryptography/hazmat/primitives/ciphers/algorithms.py b/cryptography/hazmat/primitives/ciphers/algorithms.py index c135f563..1ed487b6 100644 --- a/cryptography/hazmat/primitives/ciphers/algorithms.py +++ b/cryptography/hazmat/primitives/ciphers/algorithms.py @@ -13,7 +13,10 @@ from __future__ import absolute_import, division, print_function +from cryptography.hazmat.primitives import interfaces + +@interfaces.register(interfaces.CipherAlgorithm) class AES(object): name = "AES" block_size = 128 @@ -33,6 +36,7 @@ class AES(object): return len(self.key) * 8 +@interfaces.register(interfaces.CipherAlgorithm) class Camellia(object): name = "camellia" block_size = 128 @@ -52,6 +56,7 @@ class Camellia(object): return len(self.key) * 8 +@interfaces.register(interfaces.CipherAlgorithm) class TripleDES(object): name = "3DES" block_size = 64 @@ -75,6 +80,7 @@ class TripleDES(object): return len(self.key) * 8 +@interfaces.register(interfaces.CipherAlgorithm) class Blowfish(object): name = "Blowfish" block_size = 64 @@ -94,6 +100,7 @@ class Blowfish(object): return len(self.key) * 8 +@interfaces.register(interfaces.CipherAlgorithm) class CAST5(object): name = "CAST5" block_size = 64 @@ -113,6 +120,7 @@ class CAST5(object): return len(self.key) * 8 +@interfaces.register(interfaces.CipherAlgorithm) class ARC4(object): name = "RC4" block_size = 1 |