diff options
author | lloyd <[email protected]> | 2010-10-12 19:59:26 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2010-10-12 19:59:26 +0000 |
commit | 39306575081f043d1c79ade43797d3595fd5aeec (patch) | |
tree | 926b8833f6cbde9f929b2b6156fd27b5d69f5266 /src/pubkey/dsa | |
parent | a85f136550c08fc878e3983866af0e6460e980da (diff) |
Use size_t instead of u32bit in all of pubkey
Diffstat (limited to 'src/pubkey/dsa')
-rw-r--r-- | src/pubkey/dsa/dsa.cpp | 6 | ||||
-rw-r--r-- | src/pubkey/dsa/dsa.h | 24 |
2 files changed, 15 insertions, 15 deletions
diff --git a/src/pubkey/dsa/dsa.cpp b/src/pubkey/dsa/dsa.cpp index a3917b3d7..5e511840f 100644 --- a/src/pubkey/dsa/dsa.cpp +++ b/src/pubkey/dsa/dsa.cpp @@ -74,7 +74,7 @@ DSA_Signature_Operation::DSA_Signature_Operation(const DSA_PrivateKey& dsa) : } SecureVector<byte> -DSA_Signature_Operation::sign(const byte msg[], u32bit msg_len, +DSA_Signature_Operation::sign(const byte msg[], size_t msg_len, RandomNumberGenerator& rng) { rng.add_entropy(msg, msg_len); @@ -108,8 +108,8 @@ DSA_Verification_Operation::DSA_Verification_Operation(const DSA_PublicKey& dsa) mod_q = Modular_Reducer(dsa.group_q()); } -bool DSA_Verification_Operation::verify(const byte msg[], u32bit msg_len, - const byte sig[], u32bit sig_len) +bool DSA_Verification_Operation::verify(const byte msg[], size_t msg_len, + const byte sig[], size_t sig_len) { const BigInt& q = mod_q.get_modulus(); diff --git a/src/pubkey/dsa/dsa.h b/src/pubkey/dsa/dsa.h index 65b6edd98..a41a8432c 100644 --- a/src/pubkey/dsa/dsa.h +++ b/src/pubkey/dsa/dsa.h @@ -24,9 +24,9 @@ class BOTAN_DLL DSA_PublicKey : public virtual DL_Scheme_PublicKey std::string algo_name() const { return "DSA"; } DL_Group::Format group_format() const { return DL_Group::ANSI_X9_57; } - u32bit message_parts() const { return 2; } - u32bit message_part_size() const { return group_q().bytes(); } - u32bit max_input_bits() const { return group_q().bits(); } + size_t message_parts() const { return 2; } + size_t message_part_size() const { return group_q().bytes(); } + size_t max_input_bits() const { return group_q().bits(); } DSA_PublicKey(const AlgorithmIdentifier& alg_id, const MemoryRegion<byte>& key_bits) : @@ -65,11 +65,11 @@ class BOTAN_DLL DSA_Signature_Operation : public PK_Ops::Signature public: DSA_Signature_Operation(const DSA_PrivateKey& dsa); - u32bit message_parts() const { return 2; } - u32bit message_part_size() const { return q.bytes(); } - u32bit max_input_bits() const { return q.bits(); } + size_t message_parts() const { return 2; } + size_t message_part_size() const { return q.bytes(); } + size_t max_input_bits() const { return q.bits(); } - SecureVector<byte> sign(const byte msg[], u32bit msg_len, + SecureVector<byte> sign(const byte msg[], size_t msg_len, RandomNumberGenerator& rng); private: const BigInt& q; @@ -86,14 +86,14 @@ class BOTAN_DLL DSA_Verification_Operation : public PK_Ops::Verification public: DSA_Verification_Operation(const DSA_PublicKey& dsa); - u32bit message_parts() const { return 2; } - u32bit message_part_size() const { return q.bytes(); } - u32bit max_input_bits() const { return q.bits(); } + size_t message_parts() const { return 2; } + size_t message_part_size() const { return q.bytes(); } + size_t max_input_bits() const { return q.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 BigInt& q; const BigInt& y; |