diff options
author | Daniel Seither <[email protected]> | 2015-07-30 19:16:22 +0200 |
---|---|---|
committer | Daniel Seither <[email protected]> | 2015-07-30 19:16:22 +0200 |
commit | d2cda3e74e79b2f19086d943918fdb66699f28d7 (patch) | |
tree | cc5f1a9c94481b8f2917006fcda4b93c104148c0 /src/lib/rng | |
parent | f2edce7bf7fd2132e1a153093df4d47d5f57efcc (diff) |
rng: Add missing overrides
Diffstat (limited to 'src/lib/rng')
-rw-r--r-- | src/lib/rng/auto_rng/auto_rng.h | 12 | ||||
-rw-r--r-- | src/lib/rng/hmac_drbg/hmac_drbg.h | 12 | ||||
-rw-r--r-- | src/lib/rng/rng.h | 12 | ||||
-rw-r--r-- | src/lib/rng/system_rng/system_rng.cpp | 12 | ||||
-rw-r--r-- | src/lib/rng/x931_rng/x931_rng.h | 12 |
5 files changed, 30 insertions, 30 deletions
diff --git a/src/lib/rng/auto_rng/auto_rng.h b/src/lib/rng/auto_rng/auto_rng.h index bb36f672e..a7b28af92 100644 --- a/src/lib/rng/auto_rng/auto_rng.h +++ b/src/lib/rng/auto_rng/auto_rng.h @@ -16,18 +16,18 @@ namespace Botan { class BOTAN_DLL AutoSeeded_RNG : public RandomNumberGenerator { public: - void randomize(byte out[], size_t len) + void randomize(byte out[], size_t len) override { m_rng->randomize(out, len); } - bool is_seeded() const { return m_rng->is_seeded(); } + bool is_seeded() const override { return m_rng->is_seeded(); } - void clear() { m_rng->clear(); } + void clear() override { m_rng->clear(); } - std::string name() const { return m_rng->name(); } + std::string name() const override { return m_rng->name(); } - void reseed(size_t poll_bits = 256) { m_rng->reseed(poll_bits); } + void reseed(size_t poll_bits = 256) override { m_rng->reseed(poll_bits); } - void add_entropy(const byte in[], size_t len) + void add_entropy(const byte in[], size_t len) override { m_rng->add_entropy(in, len); } AutoSeeded_RNG() : m_rng(RandomNumberGenerator::make_rng()) {} diff --git a/src/lib/rng/hmac_drbg/hmac_drbg.h b/src/lib/rng/hmac_drbg/hmac_drbg.h index 979b754b2..2fefdef0d 100644 --- a/src/lib/rng/hmac_drbg/hmac_drbg.h +++ b/src/lib/rng/hmac_drbg/hmac_drbg.h @@ -19,14 +19,14 @@ namespace Botan { class BOTAN_DLL HMAC_DRBG : public RandomNumberGenerator { public: - void randomize(byte buf[], size_t buf_len); - bool is_seeded() const; - void clear(); - std::string name() const; + void randomize(byte buf[], size_t buf_len) override; + bool is_seeded() const override; + void clear() override; + std::string name() const override; - void reseed(size_t poll_bits); + void reseed(size_t poll_bits) override; - void add_entropy(const byte input[], size_t input_len); + void add_entropy(const byte input[], size_t input_len) override; /** * @param mac the underlying mac function (eg HMAC(SHA-512)) diff --git a/src/lib/rng/rng.h b/src/lib/rng/rng.h index 2abd11532..b1f78f75d 100644 --- a/src/lib/rng/rng.h +++ b/src/lib/rng/rng.h @@ -120,37 +120,37 @@ class BOTAN_DLL Null_RNG : public RandomNumberGenerator class BOTAN_DLL Serialized_RNG : public RandomNumberGenerator { public: - void randomize(byte out[], size_t len) + void randomize(byte out[], size_t len) override { std::lock_guard<std::mutex> lock(m_mutex); m_rng->randomize(out, len); } - bool is_seeded() const + bool is_seeded() const override { std::lock_guard<std::mutex> lock(m_mutex); return m_rng->is_seeded(); } - void clear() + void clear() override { std::lock_guard<std::mutex> lock(m_mutex); m_rng->clear(); } - std::string name() const + std::string name() const override { std::lock_guard<std::mutex> lock(m_mutex); return m_rng->name(); } - void reseed(size_t poll_bits) + void reseed(size_t poll_bits) override { std::lock_guard<std::mutex> lock(m_mutex); m_rng->reseed(poll_bits); } - void add_entropy(const byte in[], size_t len) + void add_entropy(const byte in[], size_t len) override { std::lock_guard<std::mutex> lock(m_mutex); m_rng->add_entropy(in, len); diff --git a/src/lib/rng/system_rng/system_rng.cpp b/src/lib/rng/system_rng/system_rng.cpp index 59a8b014f..1ab80669b 100644 --- a/src/lib/rng/system_rng/system_rng.cpp +++ b/src/lib/rng/system_rng/system_rng.cpp @@ -34,14 +34,14 @@ class System_RNG : public RandomNumberGenerator System_RNG(); ~System_RNG(); - void randomize(byte buf[], size_t len); + void randomize(byte buf[], size_t len) override; - bool is_seeded() const { return true; } - void clear() {} - std::string name() const { return "system"; } + bool is_seeded() const override { return true; } + void clear() override {} + std::string name() const override { return "system"; } - void reseed(size_t) {} - void add_entropy(const byte[], size_t) {} + void reseed(size_t) override {} + void add_entropy(const byte[], size_t) override {} private: #if defined(BOTAN_TARGET_OS_HAS_CRYPTGENRANDOM) diff --git a/src/lib/rng/x931_rng/x931_rng.h b/src/lib/rng/x931_rng/x931_rng.h index 8b1513035..899fed956 100644 --- a/src/lib/rng/x931_rng/x931_rng.h +++ b/src/lib/rng/x931_rng/x931_rng.h @@ -19,13 +19,13 @@ namespace Botan { class BOTAN_DLL ANSI_X931_RNG : public RandomNumberGenerator { public: - void randomize(byte[], size_t); - bool is_seeded() const; - void clear(); - std::string name() const; + void randomize(byte[], size_t) override; + bool is_seeded() const override; + void clear() override; + std::string name() const override; - void reseed(size_t poll_bits); - void add_entropy(const byte[], size_t); + void reseed(size_t poll_bits) override; + void add_entropy(const byte[], size_t) override; /** * @param cipher the block cipher to use in this PRNG |