aboutsummaryrefslogtreecommitdiffstats
path: root/src/tests/test_xmss.cpp
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2018-05-29 14:48:15 -0400
committerJack Lloyd <[email protected]>2018-05-29 14:48:15 -0400
commit48fb47c2aad3d39c51d971685b0be3f6a9292e15 (patch)
treefaeca0d57adec9f76bc5fbe0f5f84383b79f787f /src/tests/test_xmss.cpp
parent5b60dae056a652c9eb0b480db8bfa020ead9d4e1 (diff)
Make the tests VarMap an actual type instead of a hashmap typedef.
Diffstat (limited to 'src/tests/test_xmss.cpp')
-rw-r--r--src/tests/test_xmss.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/tests/test_xmss.cpp b/src/tests/test_xmss.cpp
index f8610e1e1..1c0b713f6 100644
--- a/src/tests/test_xmss.cpp
+++ b/src/tests/test_xmss.cpp
@@ -32,7 +32,7 @@ class XMSS_Signature_Tests final : public PK_Signature_Generation_Test
{
if(Test::run_long_tests() == false)
{
- const std::string params = get_req_str(vars, "Params");
+ const std::string params = vars.get_req_str("Params");
if(params == "SHAKE128_W16_H10")
{
@@ -47,12 +47,12 @@ class XMSS_Signature_Tests final : public PK_Signature_Generation_Test
std::string default_padding(const VarMap& vars) const override
{
- return get_req_str(vars, "Params");
+ return vars.get_req_str("Params");
}
std::unique_ptr<Botan::Private_Key> load_private_key(const VarMap& vars) override
{
- const std::vector<uint8_t> raw_key = get_req_bin(vars, "PrivateKey");
+ const std::vector<uint8_t> raw_key = vars.get_req_bin("PrivateKey");
const Botan::secure_vector<uint8_t> sec_key(raw_key.begin(), raw_key.end());
std::unique_ptr<Botan::Private_Key> key(new Botan::XMSS_PrivateKey(sec_key));
@@ -71,12 +71,12 @@ class XMSS_Signature_Verify_Tests final : public PK_Signature_Verification_Test
std::string default_padding(const VarMap& vars) const override
{
- return get_req_str(vars, "Params");
+ return vars.get_req_str("Params");
}
std::unique_ptr<Botan::Public_Key> load_public_key(const VarMap& vars) override
{
- const std::vector<uint8_t> raw_key = get_req_bin(vars, "PublicKey");
+ const std::vector<uint8_t> raw_key = vars.get_req_bin("PublicKey");
std::unique_ptr<Botan::Public_Key> key(new Botan::XMSS_PublicKey(raw_key));
return key;
}
@@ -93,12 +93,12 @@ class XMSS_Signature_Verify_Invalid_Tests final : public PK_Signature_NonVerific
std::string default_padding(const VarMap& vars) const override
{
- return get_req_str(vars, "Params");
+ return vars.get_req_str("Params");
}
std::unique_ptr<Botan::Public_Key> load_public_key(const VarMap& vars) override
{
- const std::vector<uint8_t> raw_key = get_req_bin(vars, "PublicKey");
+ const std::vector<uint8_t> raw_key = vars.get_req_bin("PublicKey");
std::unique_ptr<Botan::Public_Key> key(new Botan::XMSS_PublicKey(raw_key));
return key;
}