aboutsummaryrefslogtreecommitdiffstats
path: root/src/pubkey/ecdsa
diff options
context:
space:
mode:
authorlloyd <[email protected]>2010-10-12 19:59:26 +0000
committerlloyd <[email protected]>2010-10-12 19:59:26 +0000
commit39306575081f043d1c79ade43797d3595fd5aeec (patch)
tree926b8833f6cbde9f929b2b6156fd27b5d69f5266 /src/pubkey/ecdsa
parenta85f136550c08fc878e3983866af0e6460e980da (diff)
Use size_t instead of u32bit in all of pubkey
Diffstat (limited to 'src/pubkey/ecdsa')
-rw-r--r--src/pubkey/ecdsa/ecdsa.cpp6
-rw-r--r--src/pubkey/ecdsa/ecdsa.h24
2 files changed, 15 insertions, 15 deletions
diff --git a/src/pubkey/ecdsa/ecdsa.cpp b/src/pubkey/ecdsa/ecdsa.cpp
index 2522fa9f3..9a3510c33 100644
--- a/src/pubkey/ecdsa/ecdsa.cpp
+++ b/src/pubkey/ecdsa/ecdsa.cpp
@@ -33,7 +33,7 @@ ECDSA_Signature_Operation::ECDSA_Signature_Operation(const ECDSA_PrivateKey& ecd
}
SecureVector<byte>
-ECDSA_Signature_Operation::sign(const byte msg[], u32bit msg_len,
+ECDSA_Signature_Operation::sign(const byte msg[], size_t msg_len,
RandomNumberGenerator& rng)
{
rng.add_entropy(msg, msg_len);
@@ -69,8 +69,8 @@ ECDSA_Verification_Operation::ECDSA_Verification_Operation(const ECDSA_PublicKey
{
}
-bool ECDSA_Verification_Operation::verify(const byte msg[], u32bit msg_len,
- const byte sig[], u32bit sig_len)
+bool ECDSA_Verification_Operation::verify(const byte msg[], size_t msg_len,
+ const byte sig[], size_t sig_len)
{
if(sig_len != order.bytes()*2)
return false;
diff --git a/src/pubkey/ecdsa/ecdsa.h b/src/pubkey/ecdsa/ecdsa.h
index 7e7d85ab8..6d62a168d 100644
--- a/src/pubkey/ecdsa/ecdsa.h
+++ b/src/pubkey/ecdsa/ecdsa.h
@@ -47,11 +47,11 @@ class BOTAN_DLL ECDSA_PublicKey : public virtual EC_PublicKey
* This is the bitlength of the order of the base point.
* @result the maximum number of input bits
*/
- u32bit max_input_bits() const { return domain().get_order().bits(); }
+ size_t max_input_bits() const { return domain().get_order().bits(); }
- u32bit message_parts() const { return 2; }
+ size_t message_parts() const { return 2; }
- u32bit message_part_size() const
+ size_t message_part_size() const
{ return domain().get_order().bytes(); }
protected:
@@ -99,12 +99,12 @@ class BOTAN_DLL ECDSA_Signature_Operation : public PK_Ops::Signature
public:
ECDSA_Signature_Operation(const ECDSA_PrivateKey& ecdsa);
- SecureVector<byte> sign(const byte msg[], u32bit msg_len,
+ SecureVector<byte> sign(const byte msg[], size_t msg_len,
RandomNumberGenerator& rng);
- u32bit message_parts() const { return 2; }
- u32bit message_part_size() const { return order.bytes(); }
- u32bit max_input_bits() const { return order.bits(); }
+ size_t message_parts() const { return 2; }
+ size_t message_part_size() const { return order.bytes(); }
+ size_t max_input_bits() const { return order.bits(); }
private:
const PointGFp& base_point;
@@ -121,14 +121,14 @@ class BOTAN_DLL ECDSA_Verification_Operation : public PK_Ops::Verification
public:
ECDSA_Verification_Operation(const ECDSA_PublicKey& ecdsa);
- u32bit message_parts() const { return 2; }
- u32bit message_part_size() const { return order.bytes(); }
- u32bit max_input_bits() const { return order.bits(); }
+ size_t message_parts() const { return 2; }
+ size_t message_part_size() const { return order.bytes(); }
+ size_t max_input_bits() const { return order.bits(); }
bool with_recovery() const { return false; }
- bool verify(const byte msg[], u32bit msg_len,
- const byte sig[], u32bit sig_len);
+ bool verify(const byte msg[], size_t msg_len,
+ const byte sig[], size_t sig_len);
private:
const PointGFp& base_point;
const PointGFp& public_point;