summaryrefslogtreecommitdiff
path: root/validat1.cpp
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2017-09-05 16:28:00 -0400
committerJeffrey Walton <noloader@gmail.com>2017-09-05 16:28:00 -0400
commit37e02f9e0e2ee627f0f95b7bc0a09f4ba1ce562e (patch)
treec8b8cc1e9b0b56998eed479f29aa6f3da33f1755 /validat1.cpp
parent23b939c62b7f497d6f99bfe97ad639b35287ac61 (diff)
downloadcryptopp-git-37e02f9e0e2ee627f0f95b7bc0a09f4ba1ce562e.tar.gz
Revert AltiVec and Power8 commits
The strategy of "cleanup under-aligned buffers" is not scaling well. Corner cases are still turing up. The library has some corner-case breaks, like old 32-bit Intels. And it still has not solved the AltiVec and Power8 alignment problems. For now we are backing out the changes and investigating other strategies
Diffstat (limited to 'validat1.cpp')
-rw-r--r--validat1.cpp14
1 files changed, 5 insertions, 9 deletions
diff --git a/validat1.cpp b/validat1.cpp
index 62fa4b67..9990c19e 100644
--- a/validat1.cpp
+++ b/validat1.cpp
@@ -1909,10 +1909,8 @@ public:
template <class E, class D> class FixedRoundsCipherFactory : public CipherFactory
{
public:
- FixedRoundsCipherFactory(unsigned int keylen=0) :
- m_keylen(keylen ? keylen : static_cast<unsigned int>(E::DEFAULT_KEYLENGTH)) {}
-
- unsigned int BlockSize() const {return static_cast<unsigned int>(E::BLOCKSIZE);}
+ FixedRoundsCipherFactory(unsigned int keylen=0) : m_keylen(keylen?keylen:E::DEFAULT_KEYLENGTH) {}
+ unsigned int BlockSize() const {return E::BLOCKSIZE;}
unsigned int KeyLength() const {return m_keylen;}
BlockTransformation* NewEncryption(const byte *keyStr) const
@@ -1926,11 +1924,9 @@ public:
template <class E, class D> class VariableRoundsCipherFactory : public CipherFactory
{
public:
- VariableRoundsCipherFactory(unsigned int keylen=0, unsigned int rounds=0) :
- m_keylen(keylen ? keylen : static_cast<unsigned int>(E::DEFAULT_KEYLENGTH)),
- m_rounds(rounds ? rounds : static_cast<unsigned int>(E::DEFAULT_ROUNDS)) {}
-
- unsigned int BlockSize() const {return static_cast<unsigned int>(E::BLOCKSIZE);}
+ VariableRoundsCipherFactory(unsigned int keylen=0, unsigned int rounds=0)
+ : m_keylen(keylen ? keylen : E::DEFAULT_KEYLENGTH), m_rounds(rounds ? rounds : E::DEFAULT_ROUNDS) {}
+ unsigned int BlockSize() const {return E::BLOCKSIZE;}
unsigned int KeyLength() const {return m_keylen;}
BlockTransformation* NewEncryption(const byte *keyStr) const