aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorlloyd <[email protected]>2008-03-09 07:44:49 +0000
committerlloyd <[email protected]>2008-03-09 07:44:49 +0000
commit17cc4459d1e0227fc7c26836fb142da1b8e9900a (patch)
tree98d2f89ed829a0d5926aecabc83e750dd87804b1 /include
parent2ed99de0d0ae5d424f95e9cf71d790c2b07a137e (diff)
Increase the size of the buffers in ARC4 and WiderWake4+1 from 1K to
DEFAULT_BUFFERSIZE (normally 4K); measurably faster on a Core2
Diffstat (limited to 'include')
-rw-r--r--include/arc4.h4
-rw-r--r--include/wid_wake.h4
2 files changed, 6 insertions, 2 deletions
diff --git a/include/arc4.h b/include/arc4.h
index 672ad25c1..14ed290bc 100644
--- a/include/arc4.h
+++ b/include/arc4.h
@@ -25,8 +25,10 @@ class ARC4 : public StreamCipher
void cipher(const byte[], byte[], u32bit);
void key(const byte[], u32bit);
void generate();
+
const u32bit SKIP;
- SecureBuffer<byte, 1024> buffer;
+
+ SecureBuffer<byte, DEFAULT_BUFFERSIZE> buffer;
SecureBuffer<u32bit, 256> state;
u32bit X, Y, position;
};
diff --git a/include/wid_wake.h b/include/wid_wake.h
index 90cd0ce50..8355566d1 100644
--- a/include/wid_wake.h
+++ b/include/wid_wake.h
@@ -24,8 +24,10 @@ class WiderWake_41_BE : public StreamCipher
void cipher(const byte[], byte[], u32bit);
void key(const byte[], u32bit);
void resync(const byte[], u32bit);
+
void generate(u32bit);
- SecureBuffer<byte, 1024> buffer;
+
+ SecureBuffer<byte, DEFAULT_BUFFERSIZE> buffer;
SecureBuffer<u32bit, 256> T;
SecureBuffer<u32bit, 5> state;
SecureBuffer<u32bit, 4> t_key;