diff options
author | Daniel Seither <[email protected]> | 2015-07-30 17:01:25 +0200 |
---|---|---|
committer | Daniel Seither <[email protected]> | 2015-07-30 17:01:25 +0200 |
commit | 6dd2fa4a785d8aa8700dc7448048ddaaa78b6d61 (patch) | |
tree | 2408e2faee09bb77f2dd57933ddf290d6cbe237f | |
parent | 5a4549632447a307d63931a7e2d782b4c08ca31d (diff) |
filters: Add missing overrides
-rw-r--r-- | src/lib/filters/basefilt.h | 16 | ||||
-rw-r--r-- | src/lib/filters/codec_filt/b64_filt.h | 12 | ||||
-rw-r--r-- | src/lib/filters/codec_filt/hex_filt.h | 12 | ||||
-rw-r--r-- | src/lib/filters/data_snk.h | 6 | ||||
-rw-r--r-- | src/lib/filters/data_src.h | 18 | ||||
-rw-r--r-- | src/lib/filters/filters.h | 24 | ||||
-rw-r--r-- | src/lib/filters/pipe.cpp | 4 | ||||
-rw-r--r-- | src/lib/filters/pipe.h | 8 | ||||
-rw-r--r-- | src/lib/filters/secqueue.h | 14 |
9 files changed, 57 insertions, 57 deletions
diff --git a/src/lib/filters/basefilt.h b/src/lib/filters/basefilt.h index f87ac66e7..36c5201a1 100644 --- a/src/lib/filters/basefilt.h +++ b/src/lib/filters/basefilt.h @@ -19,9 +19,9 @@ namespace Botan { */ struct BOTAN_DLL BitBucket : public Filter { - void write(const byte[], size_t) {} + void write(const byte[], size_t) override {} - std::string name() const { return "BitBucket"; } + std::string name() const override { return "BitBucket"; } }; /** @@ -33,9 +33,9 @@ struct BOTAN_DLL BitBucket : public Filter class BOTAN_DLL Chain : public Fanout_Filter { public: - void write(const byte input[], size_t length) { send(input, length); } + void write(const byte input[], size_t length) override { send(input, length); } - std::string name() const; + std::string name() const override; /** * Construct a chain of up to four filters. The filters are set @@ -60,10 +60,10 @@ class BOTAN_DLL Chain : public Fanout_Filter class BOTAN_DLL Fork : public Fanout_Filter { public: - void write(const byte input[], size_t length) { send(input, length); } + void write(const byte input[], size_t length) override { send(input, length); } void set_port(size_t n) { Fanout_Filter::set_port(n); } - std::string name() const; + std::string name() const override; /** * Construct a Fork filter with up to four forks. @@ -86,7 +86,7 @@ class BOTAN_DLL Fork : public Fanout_Filter class BOTAN_DLL Threaded_Fork : public Fork { public: - std::string name() const; + std::string name() const override; /** * Construct a Threaded_Fork filter with up to four forks. @@ -104,7 +104,7 @@ class BOTAN_DLL Threaded_Fork : public Fork protected: void set_next(Filter* f[], size_t n); - void send(const byte in[], size_t length); + void send(const byte in[], size_t length) override; private: void thread_delegate_work(const byte input[], size_t length); diff --git a/src/lib/filters/codec_filt/b64_filt.h b/src/lib/filters/codec_filt/b64_filt.h index b73cca3b2..8ab428076 100644 --- a/src/lib/filters/codec_filt/b64_filt.h +++ b/src/lib/filters/codec_filt/b64_filt.h @@ -18,19 +18,19 @@ namespace Botan { class BOTAN_DLL Base64_Encoder : public Filter { public: - std::string name() const { return "Base64_Encoder"; } + std::string name() const override { return "Base64_Encoder"; } /** * Input a part of a message to the encoder. * @param input the message to input as a byte array * @param length the length of the byte array input */ - void write(const byte input[], size_t length); + void write(const byte input[], size_t length) override; /** * Inform the Encoder that the current message shall be closed. */ - void end_msg(); + void end_msg() override; /** * Create a base64 encoder. @@ -57,19 +57,19 @@ class BOTAN_DLL Base64_Encoder : public Filter class BOTAN_DLL Base64_Decoder : public Filter { public: - std::string name() const { return "Base64_Decoder"; } + std::string name() const override { return "Base64_Decoder"; } /** * Input a part of a message to the decoder. * @param input the message to input as a byte array * @param length the length of the byte array input */ - void write(const byte input[], size_t length); + void write(const byte input[], size_t length) override; /** * Finish up the current message */ - void end_msg(); + void end_msg() override; /** * Create a base64 decoder. diff --git a/src/lib/filters/codec_filt/hex_filt.h b/src/lib/filters/codec_filt/hex_filt.h index 008fd6799..6130e729c 100644 --- a/src/lib/filters/codec_filt/hex_filt.h +++ b/src/lib/filters/codec_filt/hex_filt.h @@ -24,10 +24,10 @@ class BOTAN_DLL Hex_Encoder : public Filter */ enum Case { Uppercase, Lowercase }; - std::string name() const { return "Hex_Encoder"; } + std::string name() const override { return "Hex_Encoder"; } - void write(const byte in[], size_t length); - void end_msg(); + void write(const byte in[], size_t length) override; + void end_msg() override; /** * Create a hex encoder. @@ -59,10 +59,10 @@ class BOTAN_DLL Hex_Encoder : public Filter class BOTAN_DLL Hex_Decoder : public Filter { public: - std::string name() const { return "Hex_Decoder"; } + std::string name() const override { return "Hex_Decoder"; } - void write(const byte[], size_t); - void end_msg(); + void write(const byte[], size_t) override; + void end_msg() override; /** * Construct a Hex Decoder using the specified diff --git a/src/lib/filters/data_snk.h b/src/lib/filters/data_snk.h index 8c5826285..15e2de6ef 100644 --- a/src/lib/filters/data_snk.h +++ b/src/lib/filters/data_snk.h @@ -19,7 +19,7 @@ namespace Botan { class BOTAN_DLL DataSink : public Filter { public: - bool attachable() { return false; } + bool attachable() override { return false; } DataSink() {} virtual ~DataSink() {} @@ -33,9 +33,9 @@ class BOTAN_DLL DataSink : public Filter class BOTAN_DLL DataSink_Stream : public DataSink { public: - std::string name() const { return identifier; } + std::string name() const override { return identifier; } - void write(const byte[], size_t); + void write(const byte[], size_t) override; /** * Construct a DataSink_Stream from a stream. diff --git a/src/lib/filters/data_src.h b/src/lib/filters/data_src.h index e6b7b9573..8f6593879 100644 --- a/src/lib/filters/data_src.h +++ b/src/lib/filters/data_src.h @@ -97,9 +97,9 @@ class BOTAN_DLL DataSource class BOTAN_DLL DataSource_Memory : public DataSource { public: - size_t read(byte[], size_t); - size_t peek(byte[], size_t, size_t) const; - bool end_of_data() const; + size_t read(byte[], size_t) override; + size_t peek(byte[], size_t, size_t) const override; + bool end_of_data() const override; /** * Construct a memory source that reads from a string @@ -129,7 +129,7 @@ class BOTAN_DLL DataSource_Memory : public DataSource DataSource_Memory(const std::vector<byte>& in) : source(in.begin(), in.end()), offset(0) {} - virtual size_t get_bytes_read() const { return offset; } + size_t get_bytes_read() const override { return offset; } private: secure_vector<byte> source; size_t offset; @@ -141,10 +141,10 @@ class BOTAN_DLL DataSource_Memory : public DataSource class BOTAN_DLL DataSource_Stream : public DataSource { public: - size_t read(byte[], size_t); - size_t peek(byte[], size_t, size_t) const; - bool end_of_data() const; - std::string id() const; + size_t read(byte[], size_t) override; + size_t peek(byte[], size_t, size_t) const override; + bool end_of_data() const override; + std::string id() const override; DataSource_Stream(std::istream&, const std::string& id = "<std::istream>"); @@ -162,7 +162,7 @@ class BOTAN_DLL DataSource_Stream : public DataSource ~DataSource_Stream(); - virtual size_t get_bytes_read() const { return total_read; } + size_t get_bytes_read() const override { return total_read; } private: const std::string identifier; diff --git a/src/lib/filters/filters.h b/src/lib/filters/filters.h index 1a9597de3..7a527dde0 100644 --- a/src/lib/filters/filters.h +++ b/src/lib/filters/filters.h @@ -34,23 +34,23 @@ class BOTAN_DLL StreamCipher_Filter : public Keyed_Filter { public: - std::string name() const { return m_cipher->name(); } + std::string name() const override { return m_cipher->name(); } /** * Write input data * @param input data * @param input_len length of input in bytes */ - void write(const byte input[], size_t input_len); + void write(const byte input[], size_t input_len) override; - bool valid_iv_length(size_t iv_len) const + bool valid_iv_length(size_t iv_len) const override { return m_cipher->valid_iv_length(iv_len); } /** * Set the initialization vector for this filter. * @param iv the initialization vector to set */ - void set_iv(const InitializationVector& iv) + void set_iv(const InitializationVector& iv) override { m_cipher->set_iv(iv.begin(), iv.length()); } @@ -59,7 +59,7 @@ class BOTAN_DLL StreamCipher_Filter : public Keyed_Filter * Set the key of this filter. * @param key the key to set */ - void set_key(const SymmetricKey& key) { m_cipher->set_key(key); } + void set_key(const SymmetricKey& key) override { m_cipher->set_key(key); } Key_Length_Specification key_spec() const override { return m_cipher->key_spec(); } @@ -99,10 +99,10 @@ class BOTAN_DLL StreamCipher_Filter : public Keyed_Filter class BOTAN_DLL Hash_Filter : public Filter { public: - void write(const byte input[], size_t len) { m_hash->update(input, len); } - void end_msg(); + void write(const byte input[], size_t len) override { m_hash->update(input, len); } + void end_msg() override; - std::string name() const { return m_hash->name(); } + std::string name() const override { return m_hash->name(); } /** * Construct a hash filter. @@ -136,16 +136,16 @@ class BOTAN_DLL Hash_Filter : public Filter class BOTAN_DLL MAC_Filter : public Keyed_Filter { public: - void write(const byte input[], size_t len) { m_mac->update(input, len); } - void end_msg(); + void write(const byte input[], size_t len) override { m_mac->update(input, len); } + void end_msg() override; - std::string name() const { return m_mac->name(); } + std::string name() const override { return m_mac->name(); } /** * Set the key of this filter. * @param key the key to set */ - void set_key(const SymmetricKey& key) { m_mac->set_key(key); } + void set_key(const SymmetricKey& key) override { m_mac->set_key(key); } Key_Length_Specification key_spec() const override { return m_mac->key_spec(); } diff --git a/src/lib/filters/pipe.cpp b/src/lib/filters/pipe.cpp index b3bbe501f..15ace9ffc 100644 --- a/src/lib/filters/pipe.cpp +++ b/src/lib/filters/pipe.cpp @@ -20,10 +20,10 @@ namespace { class Null_Filter : public Filter { public: - void write(const byte input[], size_t length) + void write(const byte input[], size_t length) override { send(input, length); } - std::string name() const { return "Null"; } + std::string name() const override { return "Null"; } }; } diff --git a/src/lib/filters/pipe.h b/src/lib/filters/pipe.h index b8d8c707c..fac8a1ba3 100644 --- a/src/lib/filters/pipe.h +++ b/src/lib/filters/pipe.h @@ -145,7 +145,7 @@ class BOTAN_DLL Pipe : public DataSource * @param length the length of the byte array output * @return number of bytes actually read into output */ - size_t read(byte output[], size_t length); + size_t read(byte output[], size_t length) override; /** * Read a specified message from the pipe. Moves the internal @@ -191,7 +191,7 @@ class BOTAN_DLL Pipe : public DataSource * @param offset the offset from the current position in message * @return number of bytes actually peeked and written into output */ - size_t peek(byte output[], size_t length, size_t offset) const; + size_t peek(byte output[], size_t length, size_t offset) const override; /** Read from the specified message but do not modify the * internal offset. Consecutive calls to peek() will return @@ -219,7 +219,7 @@ class BOTAN_DLL Pipe : public DataSource /** * @return the number of bytes read from the default message. */ - size_t get_bytes_read() const; + size_t get_bytes_read() const override; /** * @return the number of bytes read from the specified message. @@ -248,7 +248,7 @@ class BOTAN_DLL Pipe : public DataSource * Test whether this pipe has any data that can be read from. * @return true if there is more data to read, false otherwise */ - bool end_of_data() const; + bool end_of_data() const override; /** * Start a new message in the pipe. A potential other message in this pipe diff --git a/src/lib/filters/secqueue.h b/src/lib/filters/secqueue.h index 7eb8ffc17..a0164dcf2 100644 --- a/src/lib/filters/secqueue.h +++ b/src/lib/filters/secqueue.h @@ -20,15 +20,15 @@ namespace Botan { class BOTAN_DLL SecureQueue : public Fanout_Filter, public DataSource { public: - std::string name() const { return "Queue"; } + std::string name() const override { return "Queue"; } - void write(const byte[], size_t); + void write(const byte[], size_t) override; - size_t read(byte[], size_t); - size_t peek(byte[], size_t, size_t = 0) const; - size_t get_bytes_read() const; + size_t read(byte[], size_t) override; + size_t peek(byte[], size_t, size_t = 0) const override; + size_t get_bytes_read() const override; - bool end_of_data() const; + bool end_of_data() const override; bool empty() const; @@ -37,7 +37,7 @@ class BOTAN_DLL SecureQueue : public Fanout_Filter, public DataSource */ size_t size() const; - bool attachable() { return false; } + bool attachable() override { return false; } /** * SecureQueue assignment |