diff options
Diffstat (limited to 'src/tests/test_pbkdf.cpp')
-rw-r--r-- | src/tests/test_pbkdf.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/tests/test_pbkdf.cpp b/src/tests/test_pbkdf.cpp index 6694e0522..eb344b2ea 100644 --- a/src/tests/test_pbkdf.cpp +++ b/src/tests/test_pbkdf.cpp @@ -30,11 +30,11 @@ class PBKDF_KAT_Tests final : public Text_Based_Test Test::Result run_one_test(const std::string& pbkdf_name, const VarMap& vars) override { - const size_t iterations = get_req_sz(vars, "Iterations"); - const std::vector<uint8_t> salt = get_req_bin(vars, "Salt"); - const std::string passphrase = get_req_str(vars, "Passphrase"); - const std::vector<uint8_t> expected = get_req_bin(vars, "Output"); - const size_t outlen = get_opt_sz(vars, "OutputLen", expected.size()); + const size_t iterations = vars.get_req_sz("Iterations"); + const std::vector<uint8_t> salt = vars.get_req_bin("Salt"); + const std::string passphrase = vars.get_req_str("Passphrase"); + const std::vector<uint8_t> expected = vars.get_req_bin("Output"); + const size_t outlen = vars.get_opt_sz("OutputLen", expected.size()); Test::Result result(pbkdf_name); std::unique_ptr<Botan::PBKDF> pbkdf(Botan::PBKDF::create(pbkdf_name)); @@ -70,12 +70,12 @@ class Scrypt_KAT_Tests final : public Text_Based_Test Test::Result run_one_test(const std::string&, const VarMap& vars) override { - const size_t N = get_req_sz(vars, "N"); - const size_t R = get_req_sz(vars, "R"); - const size_t P = get_req_sz(vars, "P"); - const std::vector<uint8_t> salt = get_req_bin(vars, "Salt"); - const std::string passphrase = get_req_str(vars, "Passphrase"); - const std::vector<uint8_t> expected = get_req_bin(vars, "Output"); + const size_t N = vars.get_req_sz("N"); + const size_t R = vars.get_req_sz("R"); + const size_t P = vars.get_req_sz("P"); + const std::vector<uint8_t> salt = vars.get_req_bin("Salt"); + const std::string passphrase = vars.get_req_str("Passphrase"); + const std::vector<uint8_t> expected = vars.get_req_bin("Output"); Test::Result result("scrypt"); |