From 22f02b418f7f53431da168abe9fb74f15bf3cb0e Mon Sep 17 00:00:00 2001 From: lloyd Date: Thu, 28 Oct 2010 21:15:21 +0000 Subject: 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. --- src/stream/ofb/ofb.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'src/stream/ofb/ofb.cpp') diff --git a/src/stream/ofb/ofb.cpp b/src/stream/ofb/ofb.cpp index 1f25c5c14..382a2b4dd 100644 --- a/src/stream/ofb/ofb.cpp +++ b/src/stream/ofb/ofb.cpp @@ -14,11 +14,7 @@ namespace Botan { /* * OFB Constructor */ -OFB::OFB(BlockCipher* ciph) : - StreamCipher(ciph->MINIMUM_KEYLENGTH, - ciph->MAXIMUM_KEYLENGTH, - ciph->KEYLENGTH_MULTIPLE), - permutation(ciph) +OFB::OFB(BlockCipher* ciph) : permutation(ciph) { position = 0; buffer.resize(permutation->block_size()); -- cgit v1.2.3