aboutsummaryrefslogtreecommitdiffstats
path: root/src/pk_pad/emsa_raw
diff options
context:
space:
mode:
authorlloyd <[email protected]>2010-10-12 20:00:20 +0000
committerlloyd <[email protected]>2010-10-12 20:00:20 +0000
commit9abeb56f7d355b8ff86cbb465ba1e0a08257ec12 (patch)
tree034f8a50d241c996e6ea1889e68a8650085bf2ff /src/pk_pad/emsa_raw
parent39306575081f043d1c79ade43797d3595fd5aeec (diff)
Use size_t instead of u32bit in pk_pad
Diffstat (limited to 'src/pk_pad/emsa_raw')
-rw-r--r--src/pk_pad/emsa_raw/emsa_raw.cpp10
-rw-r--r--src/pk_pad/emsa_raw/emsa_raw.h6
2 files changed, 8 insertions, 8 deletions
diff --git a/src/pk_pad/emsa_raw/emsa_raw.cpp b/src/pk_pad/emsa_raw/emsa_raw.cpp
index 4d32ef7a9..d0f3918dd 100644
--- a/src/pk_pad/emsa_raw/emsa_raw.cpp
+++ b/src/pk_pad/emsa_raw/emsa_raw.cpp
@@ -12,7 +12,7 @@ namespace Botan {
/*
* EMSA-Raw Encode Operation
*/
-void EMSA_Raw::update(const byte input[], u32bit length)
+void EMSA_Raw::update(const byte input[], size_t length)
{
message += std::make_pair(input, length);
}
@@ -31,7 +31,7 @@ SecureVector<byte> EMSA_Raw::raw_data()
* EMSA-Raw Encode Operation
*/
SecureVector<byte> EMSA_Raw::encoding_of(const MemoryRegion<byte>& msg,
- u32bit,
+ size_t,
RandomNumberGenerator&)
{
return msg;
@@ -42,7 +42,7 @@ SecureVector<byte> EMSA_Raw::encoding_of(const MemoryRegion<byte>& msg,
*/
bool EMSA_Raw::verify(const MemoryRegion<byte>& coded,
const MemoryRegion<byte>& raw,
- u32bit)
+ size_t)
{
if(coded.size() == raw.size())
return (coded == raw);
@@ -51,11 +51,11 @@ bool EMSA_Raw::verify(const MemoryRegion<byte>& coded,
return false;
// handle zero padding differences
- const u32bit leading_zeros_expected = raw.size() - coded.size();
+ const size_t leading_zeros_expected = raw.size() - coded.size();
bool same_modulo_leading_zeros = true;
- for(u32bit i = 0; i != leading_zeros_expected; ++i)
+ for(size_t i = 0; i != leading_zeros_expected; ++i)
if(raw[i])
same_modulo_leading_zeros = false;
diff --git a/src/pk_pad/emsa_raw/emsa_raw.h b/src/pk_pad/emsa_raw/emsa_raw.h
index ab27877a6..2ccd076f2 100644
--- a/src/pk_pad/emsa_raw/emsa_raw.h
+++ b/src/pk_pad/emsa_raw/emsa_raw.h
@@ -19,13 +19,13 @@ namespace Botan {
class BOTAN_DLL EMSA_Raw : public EMSA
{
private:
- void update(const byte[], u32bit);
+ void update(const byte[], size_t);
SecureVector<byte> raw_data();
- SecureVector<byte> encoding_of(const MemoryRegion<byte>&, u32bit,
+ SecureVector<byte> encoding_of(const MemoryRegion<byte>&, size_t,
RandomNumberGenerator&);
bool verify(const MemoryRegion<byte>&, const MemoryRegion<byte>&,
- u32bit);
+ size_t);
SecureVector<byte> message;
};