diff options
Diffstat (limited to 'src/kdf/mgf1')
-rw-r--r-- | src/kdf/mgf1/mgf1.cpp | 10 | ||||
-rw-r--r-- | src/kdf/mgf1/mgf1.h | 2 |
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 |