summaryrefslogtreecommitdiff
path: root/rijndael.h
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2017-10-05 09:28:56 -0400
committerJeffrey Walton <noloader@gmail.com>2017-10-05 09:28:56 -0400
commit01e46aa474f6310d281b29ba41b0e6bc696873aa (patch)
tree2660849f1b6e792e43e6d90260aebf7cac37eed4 /rijndael.h
parent1d0df34ae8304fa964cb7702e4f4476bbf6e9e7c (diff)
downloadcryptopp-git-01e46aa474f6310d281b29ba41b0e6bc696873aa.tar.gz
Move AliasedWithTable into unnamed namespace
Move m_aliasBlock into Rijndael::Base. m_aliasBlock is now an extra data member for Dec because the aliased table is only used for Enc when unaligned data access is in effect. However, the SecBlock is not allocated in the Dec class so there is no runtime penalty. Moving m_aliasBlock into Base also allowed us to remove the Enc::Enc() constructor, which always appeared as a wart in my eyes. Now m_aliasBlock is sized in UncheckedSetKey, so there's no need for the ctor initialization. Also see https://stackoverflow.com/q/46561818/608639 on Stack Overflow. The SO question had an unusual/unexpected interaction with CMake, so the removal of the Enc::Enc() ctor should help the problem.
Diffstat (limited to 'rijndael.h')
-rw-r--r--rijndael.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/rijndael.h b/rijndael.h
index facc3f4b..867817b4 100644
--- a/rijndael.h
+++ b/rijndael.h
@@ -57,6 +57,7 @@ class CRYPTOPP_DLL Rijndael : public Rijndael_Info, public BlockCipherDocumentat
unsigned int m_rounds;
FixedSizeAlignedSecBlock<word32, 4*15> m_key;
+ SecByteBlock m_aliasBlock;
};
//! \brief Provides implementation for encryption transformation
@@ -69,10 +70,7 @@ class CRYPTOPP_DLL Rijndael : public Rijndael_Info, public BlockCipherDocumentat
public:
void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const;
#if CRYPTOPP_ENABLE_ADVANCED_PROCESS_BLOCKS
- Enc();
size_t AdvancedProcessBlocks(const byte *inBlocks, const byte *xorBlocks, byte *outBlocks, size_t length, word32 flags) const;
- private:
- SecByteBlock m_aliasBlock;
#endif
};