diff options
author | lloyd <[email protected]> | 2011-05-16 15:39:23 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2011-05-16 15:39:23 +0000 |
commit | e1af6da15409e775d7d1eb6c12e6c2ee031df3b6 (patch) | |
tree | fc947d509b2e9f5e8e0499ba74a3c913f6689419 /checks/ecdsa.cpp | |
parent | 3ead4139654e745f3b86db5f49dde8636909e511 (diff) |
Fixes for maintainer mode warnings
Diffstat (limited to 'checks/ecdsa.cpp')
-rw-r--r-- | checks/ecdsa.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/checks/ecdsa.cpp b/checks/ecdsa.cpp index 58f76c9ba..5cf353e58 100644 --- a/checks/ecdsa.cpp +++ b/checks/ecdsa.cpp @@ -172,12 +172,12 @@ bool test_ec_sign(RandomNumberGenerator& rng) PK_Signer signer(priv_key, "EMSA1(SHA-224)"); PK_Verifier verifier(priv_key, "EMSA1(SHA-224)"); - for(u32bit i = 0; i != 256; ++i) - signer.update((byte)i); + for(size_t i = 0; i != 256; ++i) + signer.update(static_cast<byte>(i)); SecureVector<byte> sig = signer.signature(rng); for(u32bit i = 0; i != 256; ++i) - verifier.update((byte)i); + verifier.update(static_cast<byte>(i)); if(!verifier.check_signature(sig)) { std::cout << "ECDSA self-test failed!"; @@ -186,7 +186,7 @@ bool test_ec_sign(RandomNumberGenerator& rng) // now check valid signature, different input for(u32bit i = 1; i != 256; ++i) //starting from 1 - verifier.update((byte)i); + verifier.update(static_cast<byte>(i)); if(verifier.check_signature(sig)) { @@ -198,7 +198,7 @@ bool test_ec_sign(RandomNumberGenerator& rng) sig[sig.size()/2]++; for(u32bit i = 0; i != 256; ++i) - verifier.update((byte)i); + verifier.update(static_cast<byte>(i)); if(verifier.check_signature(sig)) { |