diff options
author | Gregory Haynes <greg@greghaynes.net> | 2014-12-30 22:14:39 -0800 |
---|---|---|
committer | Gregory Haynes <greg@greghaynes.net> | 2014-12-30 22:14:39 -0800 |
commit | 8487266a34bba8fdebc23281715a62a475406aa6 (patch) | |
tree | 959910dcbf8e63fb36628a396c05a370be1a60b3 /src | |
parent | 6829d7e54a72590cdc0d0af09d908a795df22d0a (diff) | |
download | cryptography-8487266a34bba8fdebc23281715a62a475406aa6.tar.gz cryptography-8487266a34bba8fdebc23281715a62a475406aa6.tar.bz2 cryptography-8487266a34bba8fdebc23281715a62a475406aa6.zip |
Move ModeAuthenticationWithTag into ciphers
This class should be broken out into the ciphers module as well.
Diffstat (limited to 'src')
-rw-r--r-- | src/cryptography/hazmat/primitives/interfaces/__init__.py | 11 | ||||
-rw-r--r-- | src/cryptography/hazmat/primitives/interfaces/ciphers.py | 9 |
2 files changed, 11 insertions, 9 deletions
diff --git a/src/cryptography/hazmat/primitives/interfaces/__init__.py b/src/cryptography/hazmat/primitives/interfaces/__init__.py index 6dedd1f8..2f9880da 100644 --- a/src/cryptography/hazmat/primitives/interfaces/__init__.py +++ b/src/cryptography/hazmat/primitives/interfaces/__init__.py @@ -12,6 +12,7 @@ from cryptography.hazmat.primitives.interfaces.ciphers import ( BlockCipherAlgorithm, CipherAlgorithm, Mode, + ModeWithAuthenticationTag, ModeWithInitializationVector, ModeWithNonce) @@ -19,21 +20,13 @@ __all__ = [ "BlockCipherAlgorithm", "CipherAlgorithm", "Mode", + "ModeWithAuthenticationTag", "ModeWithInitializationVector", "ModeWithNonce" ] @six.add_metaclass(abc.ABCMeta) -class ModeWithAuthenticationTag(object): - @abc.abstractproperty - def tag(self): - """ - The value of the tag supplied to the constructor of this mode. - """ - - -@six.add_metaclass(abc.ABCMeta) class CipherContext(object): @abc.abstractmethod def update(self, data): diff --git a/src/cryptography/hazmat/primitives/interfaces/ciphers.py b/src/cryptography/hazmat/primitives/interfaces/ciphers.py index df6d5f74..075a9c25 100644 --- a/src/cryptography/hazmat/primitives/interfaces/ciphers.py +++ b/src/cryptography/hazmat/primitives/interfaces/ciphers.py @@ -65,3 +65,12 @@ class ModeWithNonce(object): """ The value of the nonce for this mode as bytes. """ + + +@six.add_metaclass(abc.ABCMeta) +class ModeWithAuthenticationTag(object): + @abc.abstractproperty + def tag(self): + """ + The value of the tag supplied to the constructor of this mode. + """ |