aboutsummaryrefslogtreecommitdiffstats
path: root/src/pubkey/rw
diff options
context:
space:
mode:
Diffstat (limited to 'src/pubkey/rw')
-rw-r--r--src/pubkey/rw/rw.cpp6
-rw-r--r--src/pubkey/rw/rw.h10
2 files changed, 8 insertions, 8 deletions
diff --git a/src/pubkey/rw/rw.cpp b/src/pubkey/rw/rw.cpp
index a9ca8eae7..5f58d8e88 100644
--- a/src/pubkey/rw/rw.cpp
+++ b/src/pubkey/rw/rw.cpp
@@ -17,7 +17,7 @@ namespace Botan {
* Create a Rabin-Williams private key
*/
RW_PrivateKey::RW_PrivateKey(RandomNumberGenerator& rng,
- u32bit bits, u32bit exp)
+ size_t bits, size_t exp)
{
if(bits < 512)
throw Invalid_Argument(algo_name() + ": Can't make a key that is only " +
@@ -71,7 +71,7 @@ RW_Signature_Operation::RW_Signature_Operation(const RW_PrivateKey& rw) :
}
SecureVector<byte>
-RW_Signature_Operation::sign(const byte msg[], u32bit msg_len,
+RW_Signature_Operation::sign(const byte msg[], size_t msg_len,
RandomNumberGenerator& rng)
{
if(!blinder.initialized())
@@ -102,7 +102,7 @@ RW_Signature_Operation::sign(const byte msg[], u32bit msg_len,
}
SecureVector<byte>
-RW_Verification_Operation::verify_mr(const byte msg[], u32bit msg_len)
+RW_Verification_Operation::verify_mr(const byte msg[], size_t msg_len)
{
BigInt m(msg, msg_len);
diff --git a/src/pubkey/rw/rw.h b/src/pubkey/rw/rw.h
index 24f4ffab6..b8d92eb3a 100644
--- a/src/pubkey/rw/rw.h
+++ b/src/pubkey/rw/rw.h
@@ -54,7 +54,7 @@ class BOTAN_DLL RW_PrivateKey : public RW_PublicKey,
const BigInt& n = 0) :
IF_Scheme_PrivateKey(rng, p, q, e, d, n) {}
- RW_PrivateKey(RandomNumberGenerator& rng, u32bit bits, u32bit = 2);
+ RW_PrivateKey(RandomNumberGenerator& rng, size_t bits, size_t = 2);
bool check_key(RandomNumberGenerator& rng, bool) const;
};
@@ -67,9 +67,9 @@ class BOTAN_DLL RW_Signature_Operation : public PK_Ops::Signature
public:
RW_Signature_Operation(const RW_PrivateKey& rw);
- u32bit max_input_bits() const { return (n.bits() - 1); }
+ size_t max_input_bits() const { return (n.bits() - 1); }
- SecureVector<byte> sign(const byte msg[], u32bit msg_len,
+ SecureVector<byte> sign(const byte msg[], size_t msg_len,
RandomNumberGenerator& rng);
private:
const BigInt& n;
@@ -92,10 +92,10 @@ class BOTAN_DLL RW_Verification_Operation : public PK_Ops::Verification
n(rw.get_n()), powermod_e_n(rw.get_e(), rw.get_n())
{}
- u32bit max_input_bits() const { return (n.bits() - 1); }
+ size_t max_input_bits() const { return (n.bits() - 1); }
bool with_recovery() const { return true; }
- SecureVector<byte> verify_mr(const byte msg[], u32bit msg_len);
+ SecureVector<byte> verify_mr(const byte msg[], size_t msg_len);
private:
const BigInt& n;