From c27d803e89c64a36392efa9e6256e48b90567d2f Mon Sep 17 00:00:00 2001 From: lloyd Date: Tue, 23 Feb 2010 18:25:19 +0000 Subject: Make passhash9 tests more verbose since they are slow --- checks/validate.cpp | 13 +++++++++++-- 1 file 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; } -- cgit v1.2.3