diff options
author | Simon Warta <[email protected]> | 2015-06-29 13:11:23 +0200 |
---|---|---|
committer | Simon Warta <[email protected]> | 2015-06-30 10:38:23 +0200 |
commit | 8668ce8753b10e944bdc72b6e66d752759c7e710 (patch) | |
tree | 787e9829c871748b34594d35f3a5e6569ccdbb31 /src/tests/unit_ecdsa.cpp | |
parent | b90187419f64b6d38d19c888985d58f902336677 (diff) |
tests: Convert &vec[0] to vec.data()
Diffstat (limited to 'src/tests/unit_ecdsa.cpp')
-rw-r--r-- | src/tests/unit_ecdsa.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/tests/unit_ecdsa.cpp b/src/tests/unit_ecdsa.cpp index 39e656636..4d4c83ce3 100644 --- a/src/tests/unit_ecdsa.cpp +++ b/src/tests/unit_ecdsa.cpp @@ -36,7 +36,7 @@ namespace { std::string to_hex(const std::vector<byte>& bin) { - return hex_encode(&bin[0], bin.size()); + return hex_encode(bin.data(), bin.size()); } /** @@ -294,11 +294,11 @@ size_t test_create_and_verify(RandomNumberGenerator& rng) auto sv_G_secp_comp = hex_decode ( G_secp_comp ); auto sv_order_g = hex_decode ( order_g ); - // BigInt bi_p_secp = BigInt::decode ( &sv_p_secp[0], sv_p_secp.size() ); + // BigInt bi_p_secp = BigInt::decode ( sv_p_secp.data(), sv_p_secp.size() ); BigInt bi_p_secp("2117607112719756483104013348936480976596328609518055062007450442679169492999007105354629105748524349829824407773719892437896937279095106809"); - BigInt bi_a_secp = BigInt::decode ( &sv_a_secp[0], sv_a_secp.size() ); - BigInt bi_b_secp = BigInt::decode ( &sv_b_secp[0], sv_b_secp.size() ); - BigInt bi_order_g = BigInt::decode ( &sv_order_g[0], sv_order_g.size() ); + BigInt bi_a_secp = BigInt::decode ( sv_a_secp.data(), sv_a_secp.size() ); + BigInt bi_b_secp = BigInt::decode ( sv_b_secp.data(), sv_b_secp.size() ); + BigInt bi_order_g = BigInt::decode ( sv_order_g.data(), sv_order_g.size() ); CurveGFp curve(bi_p_secp, bi_a_secp, bi_b_secp); PointGFp p_G = OS2ECP ( sv_G_secp_comp, curve ); |