diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/tests/test_passhash.cpp | 6 | ||||
-rw-r--r-- | src/tests/test_pbkdf.cpp | 2 | ||||
-rw-r--r-- | src/tests/unit_ecdsa.cpp | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/src/tests/test_passhash.cpp b/src/tests/test_passhash.cpp index 7805eb7eb..a583c0eb8 100644 --- a/src/tests/test_passhash.cpp +++ b/src/tests/test_passhash.cpp @@ -37,7 +37,7 @@ class Bcrypt_Tests : public Text_Based_Test result.test_eq("correct hash accepted", Botan::check_bcrypt(password, passhash), true); // self-test low levels for each test password - for(size_t level = 4; level <= 6; ++level) + for(uint16_t level = 4; level <= 6; ++level) { const std::string gen_hash = generate_bcrypt(password, Test::rng(), level); result.test_eq("generated hash accepted", Botan::check_bcrypt(password, gen_hash), true); @@ -54,9 +54,9 @@ class Bcrypt_Tests : public Text_Based_Test const std::string password = "ag00d1_2BE5ur3"; - const size_t max_level = (Test::run_long_tests() ? 15 : 10); + const uint16_t max_level = (Test::run_long_tests() ? 15 : 10); - for(size_t level = 4; level <= max_level; ++level) + for(uint16_t level = 4; level <= max_level; ++level) { const std::string gen_hash = generate_bcrypt(password, Test::rng(), level); result.test_eq("generated hash accepted", Botan::check_bcrypt(password, gen_hash), true); diff --git a/src/tests/test_pbkdf.cpp b/src/tests/test_pbkdf.cpp index c45cc45de..fd13085d7 100644 --- a/src/tests/test_pbkdf.cpp +++ b/src/tests/test_pbkdf.cpp @@ -76,7 +76,7 @@ class PGP_S2K_Iter_Test : public Test for(size_t c = 0; c != 256; ++c) { - const size_t dec = Botan::OpenPGP_S2K::decode_count(c); + const size_t dec = Botan::OpenPGP_S2K::decode_count(static_cast<uint8_t>(c)); const size_t comp_dec = (16 + (c & 0x0F)) << ((c >> 4) + 6); result.test_eq("Decoded value matches PGP formula", dec, comp_dec); } diff --git a/src/tests/unit_ecdsa.cpp b/src/tests/unit_ecdsa.cpp index fa77814ad..ea622ade4 100644 --- a/src/tests/unit_ecdsa.cpp +++ b/src/tests/unit_ecdsa.cpp @@ -48,7 +48,7 @@ Test::Result test_hash_larger_than_n() Botan::ECDSA_PrivateKey priv_key(Test::rng(), dom_pars); std::vector<uint8_t> message(20); - std::iota(message.begin(), message.end(), 0); + std::iota(message.begin(), message.end(), static_cast<uint8_t>(0)); auto sha1 = Botan::HashFunction::create("SHA-1"); auto sha224 = Botan::HashFunction::create("SHA-224"); |