aboutsummaryrefslogtreecommitdiffstats
path: root/src/tests/test_srp6.cpp
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2019-09-13 05:43:31 -0400
committerJack Lloyd <[email protected]>2019-09-13 05:50:27 -0400
commitd8f23de97ba48449befae12eda4f6853e74b6a74 (patch)
tree8065a954e8c82da111351added304214baafea65 /src/tests/test_srp6.cpp
parent71a92630ac1e3d995a017610e82a62ad6c54d246 (diff)
Add a variant of RandomNumberGenerator::random_vec
This avoids the unlock(rng.random_vec(...)) pattern which is pretty wasteful in terms of heap overhead.
Diffstat (limited to 'src/tests/test_srp6.cpp')
-rw-r--r--src/tests/test_srp6.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/tests/test_srp6.cpp b/src/tests/test_srp6.cpp
index a25d857a2..8c84709cd 100644
--- a/src/tests/test_srp6.cpp
+++ b/src/tests/test_srp6.cpp
@@ -103,7 +103,8 @@ class SRP6_RT_Tests final : public Test
const std::string group_id = "modp/srp/1024";
const std::string hash_id = "SHA-256";
- const std::vector<uint8_t> salt = unlock(Test::rng().random_vec(16));
+ std::vector<uint8_t> salt;
+ Test::rng().random_vec(salt, 16);
const Botan::BigInt verifier = Botan::generate_srp6_verifier(username, password, salt, group_id, hash_id);