diff options
author | lloyd <[email protected]> | 2010-10-12 19:51:32 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2010-10-12 19:51:32 +0000 |
commit | a85f136550c08fc878e3983866af0e6460e980da (patch) | |
tree | e495666a243affb92b8a1c5097d536b22c305580 /src/pbe | |
parent | ff2210b035a1598bf99e18a578ff075bece8fbe5 (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 'src/pbe')
-rw-r--r-- | src/pbe/pbes1/pbes1.cpp | 6 | ||||
-rw-r--r-- | src/pbe/pbes1/pbes1.h | 2 | ||||
-rw-r--r-- | src/pbe/pbes2/pbes2.cpp | 6 | ||||
-rw-r--r-- | src/pbe/pbes2/pbes2.h | 2 |
4 files changed, 8 insertions, 8 deletions
diff --git a/src/pbe/pbes1/pbes1.cpp b/src/pbe/pbes1/pbes1.cpp index c1d34f9e3..994b02d0a 100644 --- a/src/pbe/pbes1/pbes1.cpp +++ b/src/pbe/pbes1/pbes1.cpp @@ -17,11 +17,11 @@ namespace Botan { /* * Encrypt some bytes using PBES1 */ -void PBE_PKCS5v15::write(const byte input[], u32bit length) +void PBE_PKCS5v15::write(const byte input[], size_t length) { while(length) { - u32bit put = std::min(DEFAULT_BUFFERSIZE, length); + size_t put = std::min(DEFAULT_BUFFERSIZE, length); pipe.write(input, length); flush_pipe(true); length -= put; @@ -68,7 +68,7 @@ void PBE_PKCS5v15::flush_pipe(bool safe_to_skip) SecureVector<byte> buffer(DEFAULT_BUFFERSIZE); while(pipe.remaining()) { - u32bit got = pipe.read(&buffer[0], buffer.size()); + size_t got = pipe.read(&buffer[0], buffer.size()); send(buffer, got); } } diff --git a/src/pbe/pbes1/pbes1.h b/src/pbe/pbes1/pbes1.h index dcce38e24..dd991a515 100644 --- a/src/pbe/pbes1/pbes1.h +++ b/src/pbe/pbes1/pbes1.h @@ -23,7 +23,7 @@ class BOTAN_DLL PBE_PKCS5v15 : public PBE public: std::string name() const; - void write(const byte[], u32bit); + void write(const byte[], size_t); void start_msg(); void end_msg(); diff --git a/src/pbe/pbes2/pbes2.cpp b/src/pbe/pbes2/pbes2.cpp index 0e8b3fb86..7188e42d7 100644 --- a/src/pbe/pbes2/pbes2.cpp +++ b/src/pbe/pbes2/pbes2.cpp @@ -24,11 +24,11 @@ namespace Botan { /* * Encrypt some bytes using PBES2 */ -void PBE_PKCS5v20::write(const byte input[], u32bit length) +void PBE_PKCS5v20::write(const byte input[], size_t length) { while(length) { - u32bit put = std::min(DEFAULT_BUFFERSIZE, length); + size_t put = std::min(DEFAULT_BUFFERSIZE, length); pipe.write(input, length); flush_pipe(true); length -= put; @@ -75,7 +75,7 @@ void PBE_PKCS5v20::flush_pipe(bool safe_to_skip) SecureVector<byte> buffer(DEFAULT_BUFFERSIZE); while(pipe.remaining()) { - u32bit got = pipe.read(&buffer[0], buffer.size()); + size_t got = pipe.read(&buffer[0], buffer.size()); send(buffer, got); } } diff --git a/src/pbe/pbes2/pbes2.h b/src/pbe/pbes2/pbes2.h index 4a021840a..1c7119e3a 100644 --- a/src/pbe/pbes2/pbes2.h +++ b/src/pbe/pbes2/pbes2.h @@ -29,7 +29,7 @@ class BOTAN_DLL PBE_PKCS5v20 : public PBE std::string name() const; - void write(const byte[], u32bit); + void write(const byte[], size_t); void start_msg(); void end_msg(); |