diff options
author | Jack Lloyd <[email protected]> | 2018-05-29 14:48:15 -0400 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2018-05-29 14:48:15 -0400 |
commit | 48fb47c2aad3d39c51d971685b0be3f6a9292e15 (patch) | |
tree | faeca0d57adec9f76bc5fbe0f5f84383b79f787f /src/tests/test_pbkdf.cpp | |
parent | 5b60dae056a652c9eb0b480db8bfa020ead9d4e1 (diff) |
Make the tests VarMap an actual type instead of a hashmap typedef.
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"); |