summaryrefslogtreecommitdiff
path: root/extra/yassl/taocrypt/include/blowfish.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'extra/yassl/taocrypt/include/blowfish.hpp')
-rw-r--r--extra/yassl/taocrypt/include/blowfish.hpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/extra/yassl/taocrypt/include/blowfish.hpp b/extra/yassl/taocrypt/include/blowfish.hpp
index 90d2c014b4c..94bbab7aea8 100644
--- a/extra/yassl/taocrypt/include/blowfish.hpp
+++ b/extra/yassl/taocrypt/include/blowfish.hpp
@@ -51,7 +51,7 @@ public:
enum { BLOCK_SIZE = BLOWFISH_BLOCK_SIZE, ROUNDS = 16 };
Blowfish(CipherDir DIR, Mode MODE)
- : Mode_BASE(BLOCK_SIZE, DIR, MODE) {}
+ : Mode_BASE(BLOCK_SIZE, DIR, MODE), sbox_(pbox_ + ROUNDS + 2) {}
#ifdef DO_BLOWFISH_ASM
void Process(byte*, const byte*, word32);
@@ -62,8 +62,8 @@ private:
static const word32 p_init_[ROUNDS + 2];
static const word32 s_init_[4 * 256];
- word32 pbox_[ROUNDS + 2];
- word32 sbox_[4 * 256];
+ word32 pbox_[ROUNDS + 2 + 4 * 256];
+ word32* sbox_;
void crypt_block(const word32 in[2], word32 out[2]) const;
void AsmProcess(const byte* in, byte* out) const;