aboutsummaryrefslogtreecommitdiffstats
path: root/src/tests/test_sm2.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/tests/test_sm2.cpp')
-rw-r--r--src/tests/test_sm2.cpp36
1 files changed, 18 insertions, 18 deletions
diff --git a/src/tests/test_sm2.cpp b/src/tests/test_sm2.cpp
index c4ddf6ddf..3a2318715 100644
--- a/src/tests/test_sm2.cpp
+++ b/src/tests/test_sm2.cpp
@@ -31,7 +31,7 @@ class SM2_Signature_KAT_Tests final : public PK_Signature_Generation_Test
std::string default_padding(const VarMap& vars) const override
{
- return get_req_str(vars, "Ident") + "," + get_opt_str(vars, "Hash", "SM3");
+ return vars.get_req_str("Ident") + "," + vars.get_opt_str("Hash", "SM3");
}
Botan::RandomNumberGenerator* test_rng(const std::vector<uint8_t>& nonce) const override
@@ -42,14 +42,14 @@ class SM2_Signature_KAT_Tests final : public PK_Signature_Generation_Test
std::unique_ptr<Botan::Private_Key> load_private_key(const VarMap& vars) override
{
// group params
- const BigInt p = get_req_bn(vars, "P");
- const BigInt a = get_req_bn(vars, "A");
- const BigInt b = get_req_bn(vars, "B");
- const BigInt xG = get_req_bn(vars, "xG");
- const BigInt yG = get_req_bn(vars, "yG");
- const BigInt order = get_req_bn(vars, "Order");
- const BigInt cofactor = get_req_bn(vars, "Cofactor");
- const BigInt x = get_req_bn(vars, "x");
+ const BigInt p = vars.get_req_bn("P");
+ const BigInt a = vars.get_req_bn("A");
+ const BigInt b = vars.get_req_bn("B");
+ const BigInt xG = vars.get_req_bn("xG");
+ const BigInt yG = vars.get_req_bn("yG");
+ const BigInt order = vars.get_req_bn("Order");
+ const BigInt cofactor = vars.get_req_bn("Cofactor");
+ const BigInt x = vars.get_req_bn("x");
Botan::EC_Group domain(p, a, b, xG, yG, order, cofactor);
@@ -73,7 +73,7 @@ class SM2_Encryption_KAT_Tests final : public PK_Encryption_Decryption_Test
std::string default_padding(const VarMap& vars) const override
{
- return get_opt_str(vars, "Hash", "SM3");
+ return vars.get_opt_str("Hash", "SM3");
}
bool clear_between_callbacks() const override { return false; }
@@ -86,14 +86,14 @@ class SM2_Encryption_KAT_Tests final : public PK_Encryption_Decryption_Test
std::unique_ptr<Botan::Private_Key> load_private_key(const VarMap& vars) override
{
// group params
- const BigInt p = get_req_bn(vars, "P");
- const BigInt a = get_req_bn(vars, "A");
- const BigInt b = get_req_bn(vars, "B");
- const BigInt xG = get_req_bn(vars, "xG");
- const BigInt yG = get_req_bn(vars, "yG");
- const BigInt order = get_req_bn(vars, "Order");
- const BigInt cofactor = get_req_bn(vars, "Cofactor");
- const BigInt x = get_req_bn(vars, "x");
+ const BigInt p = vars.get_req_bn("P");
+ const BigInt a = vars.get_req_bn("A");
+ const BigInt b = vars.get_req_bn("B");
+ const BigInt xG = vars.get_req_bn("xG");
+ const BigInt yG = vars.get_req_bn("yG");
+ const BigInt order = vars.get_req_bn("Order");
+ const BigInt cofactor = vars.get_req_bn("Cofactor");
+ const BigInt x = vars.get_req_bn("x");
Botan::EC_Group domain(p, a, b, xG, yG, order, cofactor);