aboutsummaryrefslogtreecommitdiffstats
path: root/checks/ecdsa.cpp
diff options
context:
space:
mode:
authorlloyd <[email protected]>2011-05-16 15:39:23 +0000
committerlloyd <[email protected]>2011-05-16 15:39:23 +0000
commite1af6da15409e775d7d1eb6c12e6c2ee031df3b6 (patch)
treefc947d509b2e9f5e8e0499ba74a3c913f6689419 /checks/ecdsa.cpp
parent3ead4139654e745f3b86db5f49dde8636909e511 (diff)
Fixes for maintainer mode warnings
Diffstat (limited to 'checks/ecdsa.cpp')
-rw-r--r--checks/ecdsa.cpp10
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))
{