aboutsummaryrefslogtreecommitdiffstats
path: root/src/kdf/mgf1
diff options
context:
space:
mode:
authorlloyd <[email protected]>2010-10-12 16:23:03 +0000
committerlloyd <[email protected]>2010-10-12 16:23:03 +0000
commite3e02712563e03fbfd6b474cfaa7c0dfdf08f267 (patch)
tree2d5049051b774cd902b6658781543ce4dc9834fe /src/kdf/mgf1
parent4a6fd8c70d40f88c8b51127bfa055b66b18e0f7a (diff)
s/u32bit/size_t/ in kdf
Diffstat (limited to 'src/kdf/mgf1')
-rw-r--r--src/kdf/mgf1/mgf1.cpp10
-rw-r--r--src/kdf/mgf1/mgf1.h2
2 files changed, 6 insertions, 6 deletions
diff --git a/src/kdf/mgf1/mgf1.cpp b/src/kdf/mgf1/mgf1.cpp
index c79ae44bb..6dc028bad 100644
--- a/src/kdf/mgf1/mgf1.cpp
+++ b/src/kdf/mgf1/mgf1.cpp
@@ -17,19 +17,19 @@ namespace Botan {
/*
* MGF1 Mask Generation Function
*/
-void MGF1::mask(const byte in[], u32bit in_len, byte out[],
- u32bit out_len) const
+void MGF1::mask(const byte in[], size_t in_len, byte out[],
+ size_t out_len) const
{
u32bit counter = 0;
while(out_len)
{
hash->update(in, in_len);
- for(u32bit j = 0; j != 4; ++j)
- hash->update(get_byte(j, counter));
+ for(size_t i = 0; i != 4; ++i)
+ hash->update(get_byte(i, counter));
SecureVector<byte> buffer = hash->final();
- u32bit xored = std::min<u32bit>(buffer.size(), out_len);
+ size_t xored = std::min<size_t>(buffer.size(), out_len);
xor_buf(out, &buffer[0], xored);
out += xored;
out_len -= xored;
diff --git a/src/kdf/mgf1/mgf1.h b/src/kdf/mgf1/mgf1.h
index 2f7655fe2..95a2a2bc5 100644
--- a/src/kdf/mgf1/mgf1.h
+++ b/src/kdf/mgf1/mgf1.h
@@ -19,7 +19,7 @@ namespace Botan {
class BOTAN_DLL MGF1 : public MGF
{
public:
- void mask(const byte[], u32bit, byte[], u32bit) const;
+ void mask(const byte[], size_t, byte[], size_t) const;
/**
MGF1 constructor: takes ownership of hash