aboutsummaryrefslogtreecommitdiffstats
path: root/checks
diff options
context:
space:
mode:
authorlloyd <[email protected]>2010-10-12 19:51:32 +0000
committerlloyd <[email protected]>2010-10-12 19:51:32 +0000
commita85f136550c08fc878e3983866af0e6460e980da (patch)
treee495666a243affb92b8a1c5097d536b22c305580 /checks
parentff2210b035a1598bf99e18a578ff075bece8fbe5 (diff)
Use size_t in filters
This breaks API for anyone creating their own Filter types, but it had to happen eventually.
Diffstat (limited to 'checks')
-rw-r--r--checks/block.cpp4
-rw-r--r--checks/dolook.cpp8
2 files changed, 6 insertions, 6 deletions
diff --git a/checks/block.cpp b/checks/block.cpp
index e3b871aa1..dc3350ce3 100644
--- a/checks/block.cpp
+++ b/checks/block.cpp
@@ -27,7 +27,7 @@ class ECB_Encryption_ErrorCheck : public Filter
std::string name() const
{ return "ECB_ErrCheck(" + cipher->name() + ")"; }
- void write(const byte[], u32bit);
+ void write(const byte[], size_t);
void end_msg();
@@ -61,7 +61,7 @@ class ECB_Encryption_ErrorCheck : public Filter
HashFunction* input_hash, *decrypt_hash;
};
-void ECB_Encryption_ErrorCheck::write(const byte input[], u32bit length)
+void ECB_Encryption_ErrorCheck::write(const byte input[], size_t length)
{
input_hash->update(input, length);
buffer.copy(position, input, length);
diff --git a/checks/dolook.cpp b/checks/dolook.cpp
index a20268332..1015f4240 100644
--- a/checks/dolook.cpp
+++ b/checks/dolook.cpp
@@ -65,7 +65,7 @@ class PBKDF_Filter : public Filter
public:
std::string name() const { return pbkdf->name(); }
- void write(const byte in[], u32bit len)
+ void write(const byte in[], size_t len)
{ passphrase += std::string(reinterpret_cast<const char*>(in), len); }
void end_msg()
@@ -98,7 +98,7 @@ class RNG_Filter : public Filter
public:
std::string name() const { return rng->name(); }
- void write(const byte[], u32bit);
+ void write(const byte[], size_t);
RNG_Filter(RandomNumberGenerator* r) : rng(r) {}
~RNG_Filter() { delete rng; }
@@ -111,7 +111,7 @@ class KDF_Filter : public Filter
public:
std::string name() const { return "KDF_Filter"; }
- void write(const byte in[], u32bit len)
+ void write(const byte in[], size_t len)
{ secret += std::make_pair(in, len); }
void end_msg()
@@ -150,7 +150,7 @@ Filter* lookup_pbkdf(const std::string& algname,
return 0;
}
-void RNG_Filter::write(const byte[], u32bit length)
+void RNG_Filter::write(const byte[], size_t length)
{
if(length)
{