aboutsummaryrefslogtreecommitdiffstats
path: root/src/block/idea/idea.h
diff options
context:
space:
mode:
authorlloyd <[email protected]>2010-09-14 01:16:32 +0000
committerlloyd <[email protected]>2010-09-14 01:16:32 +0000
commitae59295ea945fdcc482df2233409a5f878fa20c7 (patch)
tree768c30635a17847dccb6db6f36fa3b033adc37bf /src/block/idea/idea.h
parent548f48611760346fa2e47efd5c0865eff831946a (diff)
Completely remove the second parameter to SecureVector which specifies
the initial/default length of the array, update all users to instead pass the value to the constructor. This is a old vestigal thing from a class (SecureBuffer) that used this compile-time constant in order to store the values in an array. However this was changed way back in 2002 to use the same allocator hooks as the rest of the containers, so the only advantage to using the length field was that the initial length was set and didn't have to be set in the constructor which was midly convenient. However this directly conflicts with the desire to be able to (eventually) use std::vector with a custom allocator, since of course vector doesn't support this. Fortunately almost all of the uses are in classes which have only a single constructor, so there is little to no duplication by instead initializing the size in the constructor.
Diffstat (limited to 'src/block/idea/idea.h')
-rw-r--r--src/block/idea/idea.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/block/idea/idea.h b/src/block/idea/idea.h
index 737970b29..1a315ce3f 100644
--- a/src/block/idea/idea.h
+++ b/src/block/idea/idea.h
@@ -25,21 +25,21 @@ class BOTAN_DLL IDEA : public BlockCipher
std::string name() const { return "IDEA"; }
BlockCipher* clone() const { return new IDEA; }
- IDEA() : BlockCipher(8, 16) {}
+ IDEA() : BlockCipher(8, 16), EK(52), DK(52) {}
protected:
/**
* @return const reference to encryption subkeys
*/
- const SecureVector<u16bit, 52>& get_EK() const { return EK; }
+ const SecureVector<u16bit>& get_EK() const { return EK; }
/**
* @return const reference to decryption subkeys
*/
- const SecureVector<u16bit, 52>& get_DK() const { return DK; }
+ const SecureVector<u16bit>& get_DK() const { return DK; }
private:
void key_schedule(const byte[], u32bit);
- SecureVector<u16bit, 52> EK, DK;
+ SecureVector<u16bit> EK, DK;
};
}