diff options
author | Jack Lloyd <[email protected]> | 2015-07-31 11:09:24 -0400 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2015-07-31 11:09:24 -0400 |
commit | 8e19ecf11c2c50b5a2d6642477d729091409fec8 (patch) | |
tree | d87cff14d376f69f1a7ea0d9e1679385e195623a /src/tests | |
parent | 4944797ede915a606c6d5bd0e5b0a0b8f21b8eca (diff) | |
parent | c37ebd2d0bb9ad6d2cf6d4541a1de523b584b36e (diff) |
Merge pull request #231 from tiwoc/add-override
Add override specifiers
Diffstat (limited to 'src/tests')
-rw-r--r-- | src/tests/test_rng.cpp | 2 | ||||
-rw-r--r-- | src/tests/test_rng.h | 12 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/tests/test_rng.cpp b/src/tests/test_rng.cpp index 81a539f1e..d129ed208 100644 --- a/src/tests/test_rng.cpp +++ b/src/tests/test_rng.cpp @@ -31,7 +31,7 @@ RandomNumberGenerator* get_rng(const std::string& algo_str, const std::string& i public: AllOnce_RNG(const std::vector<byte>& in) : Fixed_Output_RNG(in) {} - Botan::secure_vector<byte> random_vec(size_t) + Botan::secure_vector<byte> random_vec(size_t) override { Botan::secure_vector<byte> vec(this->remaining()); this->randomize(vec.data(), vec.size()); diff --git a/src/tests/test_rng.h b/src/tests/test_rng.h index bf4032699..f1d40f7f1 100644 --- a/src/tests/test_rng.h +++ b/src/tests/test_rng.h @@ -18,7 +18,7 @@ using Botan::byte; class Fixed_Output_RNG : public Botan::RandomNumberGenerator { public: - bool is_seeded() const { return !buf.empty(); } + bool is_seeded() const override { return !buf.empty(); } byte random() { @@ -30,22 +30,22 @@ class Fixed_Output_RNG : public Botan::RandomNumberGenerator return out; } - void reseed(size_t) {} + void reseed(size_t) override {} - void randomize(byte out[], size_t len) + void randomize(byte out[], size_t len) override { for(size_t j = 0; j != len; j++) out[j] = random(); } - void add_entropy(const byte b[], size_t s) + void add_entropy(const byte b[], size_t s) override { buf.insert(buf.end(), b, b + s); } - std::string name() const { return "Fixed_Output_RNG"; } + std::string name() const override { return "Fixed_Output_RNG"; } - void clear() throw() {} + void clear() throw() override {} Fixed_Output_RNG(const std::vector<byte>& in) { |