aboutsummaryrefslogtreecommitdiffstats
path: root/src/stream
diff options
context:
space:
mode:
Diffstat (limited to 'src/stream')
-rw-r--r--src/stream/arc4/arc4.cpp2
-rw-r--r--src/stream/arc4/arc4.h2
-rw-r--r--src/stream/ctr/ctr.cpp2
-rw-r--r--src/stream/ctr/ctr.h2
-rw-r--r--src/stream/ofb/ofb.cpp2
-rw-r--r--src/stream/ofb/ofb.h2
-rw-r--r--src/stream/salsa20/salsa20.cpp2
-rw-r--r--src/stream/salsa20/salsa20.h6
-rw-r--r--src/stream/turing/turing.cpp2
-rw-r--r--src/stream/turing/turing.h2
-rw-r--r--src/stream/wid_wake/wid_wake.cpp2
-rw-r--r--src/stream/wid_wake/wid_wake.h2
12 files changed, 15 insertions, 13 deletions
diff --git a/src/stream/arc4/arc4.cpp b/src/stream/arc4/arc4.cpp
index 92a9ac092..9b8404e4e 100644
--- a/src/stream/arc4/arc4.cpp
+++ b/src/stream/arc4/arc4.cpp
@@ -59,7 +59,7 @@ void ARC4::generate()
/*
* ARC4 Key Schedule
*/
-void ARC4::key_schedule(const byte key[], u32bit length)
+void ARC4::key_schedule(const byte key[], size_t length)
{
clear();
diff --git a/src/stream/arc4/arc4.h b/src/stream/arc4/arc4.h
index aa1c39331..85ddb69b7 100644
--- a/src/stream/arc4/arc4.h
+++ b/src/stream/arc4/arc4.h
@@ -33,7 +33,7 @@ class BOTAN_DLL ARC4 : public StreamCipher
~ARC4() { clear(); }
private:
- void key_schedule(const byte[], u32bit);
+ void key_schedule(const byte[], size_t);
void generate();
const size_t SKIP;
diff --git a/src/stream/ctr/ctr.cpp b/src/stream/ctr/ctr.cpp
index f1b73a8c3..0a962bd5a 100644
--- a/src/stream/ctr/ctr.cpp
+++ b/src/stream/ctr/ctr.cpp
@@ -48,7 +48,7 @@ void CTR_BE::clear()
/*
* Set the key
*/
-void CTR_BE::key_schedule(const byte key[], u32bit key_len)
+void CTR_BE::key_schedule(const byte key[], size_t key_len)
{
permutation->set_key(key, key_len);
diff --git a/src/stream/ctr/ctr.h b/src/stream/ctr/ctr.h
index 45a3e29e2..8c317acb0 100644
--- a/src/stream/ctr/ctr.h
+++ b/src/stream/ctr/ctr.h
@@ -39,7 +39,7 @@ class BOTAN_DLL CTR_BE : public StreamCipher
CTR_BE(BlockCipher* cipher);
~CTR_BE();
private:
- void key_schedule(const byte key[], u32bit key_len);
+ void key_schedule(const byte key[], size_t key_len);
void increment_counter();
BlockCipher* permutation;
diff --git a/src/stream/ofb/ofb.cpp b/src/stream/ofb/ofb.cpp
index 1b1a066ee..921401d32 100644
--- a/src/stream/ofb/ofb.cpp
+++ b/src/stream/ofb/ofb.cpp
@@ -45,7 +45,7 @@ void OFB::clear()
/*
* Set the key
*/
-void OFB::key_schedule(const byte key[], u32bit key_len)
+void OFB::key_schedule(const byte key[], size_t key_len)
{
permutation->set_key(key, key_len);
diff --git a/src/stream/ofb/ofb.h b/src/stream/ofb/ofb.h
index 832b93287..af771de15 100644
--- a/src/stream/ofb/ofb.h
+++ b/src/stream/ofb/ofb.h
@@ -39,7 +39,7 @@ class BOTAN_DLL OFB : public StreamCipher
OFB(BlockCipher* cipher);
~OFB();
private:
- void key_schedule(const byte key[], u32bit key_len);
+ void key_schedule(const byte key[], size_t key_len);
BlockCipher* permutation;
SecureVector<byte> buffer;
diff --git a/src/stream/salsa20/salsa20.cpp b/src/stream/salsa20/salsa20.cpp
index 7f76276bb..7d062befe 100644
--- a/src/stream/salsa20/salsa20.cpp
+++ b/src/stream/salsa20/salsa20.cpp
@@ -126,7 +126,7 @@ void Salsa20::cipher(const byte in[], byte out[], size_t length)
/*
* Salsa20 Key Schedule
*/
-void Salsa20::key_schedule(const byte key[], u32bit length)
+void Salsa20::key_schedule(const byte key[], size_t length)
{
static const u32bit TAU[] =
{ 0x61707865, 0x3120646e, 0x79622d36, 0x6b206574 };
diff --git a/src/stream/salsa20/salsa20.h b/src/stream/salsa20/salsa20.h
index 2addee9a9..213cb1117 100644
--- a/src/stream/salsa20/salsa20.h
+++ b/src/stream/salsa20/salsa20.h
@@ -29,10 +29,12 @@ class BOTAN_DLL Salsa20 : public StreamCipher
std::string name() const;
StreamCipher* clone() const { return new Salsa20; }
- Salsa20() : StreamCipher(16, 32, 16), state(16), buffer(64) { position = 0; }
+ Salsa20() : StreamCipher(16, 32, 16), state(16), buffer(64)
+ { position = 0; }
+
~Salsa20() { clear(); }
private:
- void key_schedule(const byte key[], u32bit key_len);
+ void key_schedule(const byte key[], size_t key_len);
SecureVector<u32bit> state;
SecureVector<byte> buffer;
diff --git a/src/stream/turing/turing.cpp b/src/stream/turing/turing.cpp
index 160d07a65..82e3aa2bb 100644
--- a/src/stream/turing/turing.cpp
+++ b/src/stream/turing/turing.cpp
@@ -223,7 +223,7 @@ u32bit Turing::fixedS(u32bit W)
/*
* Turing Key Schedule
*/
-void Turing::key_schedule(const byte key[], u32bit length)
+void Turing::key_schedule(const byte key[], size_t length)
{
K.resize(length / 4);
for(size_t i = 0; i != length; ++i)
diff --git a/src/stream/turing/turing.h b/src/stream/turing/turing.h
index f270c291a..adfabc0f1 100644
--- a/src/stream/turing/turing.h
+++ b/src/stream/turing/turing.h
@@ -34,7 +34,7 @@ class BOTAN_DLL Turing : public StreamCipher
{ position = 0; }
private:
- void key_schedule(const byte[], u32bit);
+ void key_schedule(const byte[], size_t);
void generate();
static u32bit fixedS(u32bit);
diff --git a/src/stream/wid_wake/wid_wake.cpp b/src/stream/wid_wake/wid_wake.cpp
index 3db87214e..51159064d 100644
--- a/src/stream/wid_wake/wid_wake.cpp
+++ b/src/stream/wid_wake/wid_wake.cpp
@@ -72,7 +72,7 @@ void WiderWake_41_BE::generate(size_t length)
/*
* WiderWake Key Schedule
*/
-void WiderWake_41_BE::key_schedule(const byte key[], u32bit)
+void WiderWake_41_BE::key_schedule(const byte key[], size_t)
{
for(size_t i = 0; i != 4; ++i)
t_key[i] = load_be<u32bit>(key, i);
diff --git a/src/stream/wid_wake/wid_wake.h b/src/stream/wid_wake/wid_wake.h
index ac8d8e2d6..17e77d5b5 100644
--- a/src/stream/wid_wake/wid_wake.h
+++ b/src/stream/wid_wake/wid_wake.h
@@ -37,7 +37,7 @@ class BOTAN_DLL WiderWake_41_BE : public StreamCipher
{ }
private:
- void key_schedule(const byte[], u32bit);
+ void key_schedule(const byte[], size_t);
void generate(size_t);