aboutsummaryrefslogtreecommitdiffstats
path: root/src/stream/salsa20
diff options
context:
space:
mode:
authorlloyd <[email protected]>2010-10-13 01:34:15 +0000
committerlloyd <[email protected]>2010-10-13 01:34:15 +0000
commitfe4119c74b5e81a354a5313e4d2efbf9a135aa81 (patch)
tree5c5254cc3a4e5713169ef1d52a83db19c8c4ed65 /src/stream/salsa20
parent60fb91d8cb1710d07041f76050d24229ce91131b (diff)
Use size_t rather than u32bit in SymmetricAlgorithm
Diffstat (limited to 'src/stream/salsa20')
-rw-r--r--src/stream/salsa20/salsa20.cpp2
-rw-r--r--src/stream/salsa20/salsa20.h6
2 files changed, 5 insertions, 3 deletions
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;