aboutsummaryrefslogtreecommitdiffstats
path: root/src/mac/mac.h
diff options
context:
space:
mode:
authorlloyd <[email protected]>2010-10-28 21:15:21 +0000
committerlloyd <[email protected]>2010-10-28 21:15:21 +0000
commit22f02b418f7f53431da168abe9fb74f15bf3cb0e (patch)
treecdc81938c979403d20a438d134bbd6d64479f17d /src/mac/mac.h
parenta7a047e6823dcbf23e172dd5c0f9a7b4fd748f10 (diff)
Eliminate the constant size_t values in SymmetricAlgorithm that give
the parameters of the key length. Instead define a new function which returns a simple object which contains this information. This definitely breaks backwards compatability, though only with code that directly manipulates low level objects like BlockCipher*s directly, which is probably relatively rare. Also remove some deprecated accessor functions from lookup.h. It turns out block_size_of and output_size_of are being used in the TLS code; I need to remove them from there before I can delete these entirely. Really that didn't make much sense, because they assumed all implementations of a particular algorithm will have the same specifications, which is definitely not necessarily true, especially WRT key length. It is much safer (and probably simpler) to first retrieve an instance of the actual object you are going to use and then ask it directly.
Diffstat (limited to 'src/mac/mac.h')
-rw-r--r--src/mac/mac.h15
1 files changed, 2 insertions, 13 deletions
diff --git a/src/mac/mac.h b/src/mac/mac.h
index b788e06c8..1cb87d21e 100644
--- a/src/mac/mac.h
+++ b/src/mac/mac.h
@@ -41,24 +41,13 @@ class BOTAN_DLL MessageAuthenticationCode : public BufferedComputation,
virtual std::string name() const = 0;
/**
- * Reset the internal state of this object.
- */
- virtual void clear() = 0;
-
- /**
* @param mac_len the output length of this MAC
* @param key_min the minimum key size
* @param key_max the maximum key size
* @param key_mod the modulo restriction on the key size
*/
- MessageAuthenticationCode(size_t mac_len,
- size_t key_min,
- size_t key_max = 0,
- size_t key_mod = 1) :
- BufferedComputation(mac_len),
- SymmetricAlgorithm(key_min, key_max, key_mod) {}
-
- virtual ~MessageAuthenticationCode() {}
+ MessageAuthenticationCode(size_t mac_len) :
+ BufferedComputation(mac_len) {}
};
}