diff options
author | lloyd <[email protected]> | 2010-02-23 18:25:19 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2010-02-23 18:25:19 +0000 |
commit | c27d803e89c64a36392efa9e6256e48b90567d2f (patch) | |
tree | c8e57cc8dbefae199864e75a0eba8af753e3f4bc | |
parent | d3ba30e826ad8d541b0e859d79c90db755f04eb0 (diff) |
Make passhash9 tests more verbose since they are slow
-rw-r--r-- | checks/validate.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/checks/validate.cpp b/checks/validate.cpp index b0a877b94..093d5e3b7 100644 --- a/checks/validate.cpp +++ b/checks/validate.cpp @@ -70,18 +70,26 @@ bool test_passhash(RandomNumberGenerator& rng) { #if defined(BOTAN_HAS_PASSHASH9) + std::cout << "Testing Password Hashing: " << std::flush; + const std::string input = "secret"; const std::string fixed_hash = "$9$AAAKhiHXTIUhNhbegwBXJvk03XXJdzFMy+i3GFMIBYKtthTTmXZA"; + std::cout << "." << std::flush; + if(!check_passhash9(input, fixed_hash)) return false; + std::cout << "." << std::flush; + std::string gen_hash = generate_passhash9(input, rng, 5); if(!check_passhash9(input, gen_hash)) return false; + std::cout << "." << std::endl;; + #endif return true; @@ -206,14 +214,15 @@ u32bit do_validation_tests(const std::string& filename, } + if(should_pass) + std::cout << std::endl; + if(should_pass && !test_passhash(rng)) { std::cout << "Passhash9 tests failed" << std::endl; errors++; } - if(should_pass) - std::cout << std::endl; return errors; } |