From 73cb687bcf87fbb7d392c998bd3ad619b58fa6b0 Mon Sep 17 00:00:00 2001 From: Terry Chia Date: Mon, 20 Oct 2014 10:34:02 +0800 Subject: Remove algorithm property from MACContext and alias CMACContext. --- cryptography/hazmat/primitives/interfaces.py | 29 ++-------------------------- 1 file changed, 2 insertions(+), 27 deletions(-) diff --git a/cryptography/hazmat/primitives/interfaces.py b/cryptography/hazmat/primitives/interfaces.py index dde0a3b6..c09a9618 100644 --- a/cryptography/hazmat/primitives/interfaces.py +++ b/cryptography/hazmat/primitives/interfaces.py @@ -390,27 +390,6 @@ class KeyDerivationFunction(object): """ -@six.add_metaclass(abc.ABCMeta) -class CMACContext(object): - @abc.abstractmethod - def update(self, data): - """ - Processes the provided bytes. - """ - - @abc.abstractmethod - def finalize(self): - """ - Returns the message authentication code as bytes. - """ - - @abc.abstractmethod - def copy(self): - """ - Return a CMACContext that is a copy of the current context. - """ - - @six.add_metaclass(abc.ABCMeta) class EllipticCurve(object): @abc.abstractproperty @@ -491,12 +470,6 @@ class EllipticCurvePublicKeyWithNumbers(EllipticCurvePublicKey): @six.add_metaclass(abc.ABCMeta) class MACContext(object): - @abc.abstractproperty - def algorithm(self): - """ - The algorithm that will be used by this context. - """ - @abc.abstractmethod def update(self, data): """ @@ -521,3 +494,5 @@ class MACContext(object): Checks if the generated message authentication code matches the signature. """ + +CMACContext = MACContext -- cgit v1.2.3