From ae59295ea945fdcc482df2233409a5f878fa20c7 Mon Sep 17 00:00:00 2001 From: lloyd Date: Tue, 14 Sep 2010 01:16:32 +0000 Subject: 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. --- src/block/aes/aes.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/block/aes/aes.h') diff --git a/src/block/aes/aes.h b/src/block/aes/aes.h index 8770bdb35..ba688a6e3 100644 --- a/src/block/aes/aes.h +++ b/src/block/aes/aes.h @@ -25,7 +25,7 @@ class BOTAN_DLL AES : public BlockCipher std::string name() const { return "AES"; } BlockCipher* clone() const { return new AES; } - AES() : BlockCipher(16, 16, 32, 8) { ROUNDS = 14; } + AES() : BlockCipher(16, 16, 32, 8), EK(56), ME(16), DK(56), MD(16) { ROUNDS = 14; } /** * AES fixed to a particular key_size (16, 24, or 32 bytes) @@ -38,11 +38,11 @@ class BOTAN_DLL AES : public BlockCipher u32bit ROUNDS; - SecureVector EK; - SecureVector ME; + SecureVector EK; + SecureVector ME; - SecureVector DK; - SecureVector MD; + SecureVector DK; + SecureVector MD; }; /** -- cgit v1.2.3