diff options
author | Daniel Seither <[email protected]> | 2015-07-30 18:54:30 +0200 |
---|---|---|
committer | Daniel Seither <[email protected]> | 2015-07-30 18:54:30 +0200 |
commit | bc46687fffbdc970b13791c9c17066efb459f4cb (patch) | |
tree | d2a81da26ec517b456481e84930b17ac5a457a45 | |
parent | fee2617be48d7c86b763dbe198797b02a8ea9a7d (diff) |
modes: Add missing overrides
-rw-r--r-- | src/lib/modes/aead/ccm/ccm.h | 4 | ||||
-rw-r--r-- | src/lib/modes/aead/gcm/gcm.h | 7 | ||||
-rw-r--r-- | src/lib/modes/cbc/cbc.h | 4 | ||||
-rw-r--r-- | src/lib/modes/mode_pad/mode_pad.h | 24 | ||||
-rw-r--r-- | src/lib/modes/stream_mode.h | 2 |
5 files changed, 21 insertions, 20 deletions
diff --git a/src/lib/modes/aead/ccm/ccm.h b/src/lib/modes/aead/ccm/ccm.h index 5af5f984d..58ca447e8 100644 --- a/src/lib/modes/aead/ccm/ccm.h +++ b/src/lib/modes/aead/ccm/ccm.h @@ -28,7 +28,7 @@ class BOTAN_DLL CCM_Mode : public AEAD_Mode std::string name() const override; - size_t update_granularity() const; + size_t update_granularity() const override; Key_Length_Specification key_spec() const override; @@ -38,7 +38,7 @@ class BOTAN_DLL CCM_Mode : public AEAD_Mode void clear() override; - size_t tag_size() const { return m_tag_size; } + size_t tag_size() const override { return m_tag_size; } protected: const size_t BS = 16; // intrinsic to CCM definition diff --git a/src/lib/modes/aead/gcm/gcm.h b/src/lib/modes/aead/gcm/gcm.h index ea3263c0a..8e7ae8b7f 100644 --- a/src/lib/modes/aead/gcm/gcm.h +++ b/src/lib/modes/aead/gcm/gcm.h @@ -26,7 +26,7 @@ class BOTAN_DLL GCM_Mode : public AEAD_Mode std::string name() const override; - size_t update_granularity() const; + size_t update_granularity() const override; Key_Length_Specification key_spec() const override; @@ -121,11 +121,12 @@ class BOTAN_DLL GHASH : public SymmetricAlgorithm secure_vector<byte> final(); - Key_Length_Specification key_spec() const { return Key_Length_Specification(16); } + Key_Length_Specification key_spec() const override + { return Key_Length_Specification(16); } void clear() override; - std::string name() const { return "GHASH"; } + std::string name() const override { return "GHASH"; } private: void key_schedule(const byte key[], size_t key_len) override; diff --git a/src/lib/modes/cbc/cbc.h b/src/lib/modes/cbc/cbc.h index 963e92666..7fbcc8837 100644 --- a/src/lib/modes/cbc/cbc.h +++ b/src/lib/modes/cbc/cbc.h @@ -88,7 +88,7 @@ class BOTAN_DLL CTS_Encryption : public CBC_Encryption size_t minimum_final_size() const override; - bool valid_nonce_length(size_t n) const; + bool valid_nonce_length(size_t n) const override; }; /** @@ -123,7 +123,7 @@ class BOTAN_DLL CTS_Decryption : public CBC_Decryption size_t minimum_final_size() const override; - bool valid_nonce_length(size_t n) const; + bool valid_nonce_length(size_t n) const override; }; } diff --git a/src/lib/modes/mode_pad/mode_pad.h b/src/lib/modes/mode_pad/mode_pad.h index c4d5baf2e..91102c66c 100644 --- a/src/lib/modes/mode_pad/mode_pad.h +++ b/src/lib/modes/mode_pad/mode_pad.h @@ -63,11 +63,11 @@ class BOTAN_DLL PKCS7_Padding : public BlockCipherModePaddingMethod size_t final_block_bytes, size_t block_size) const override; - size_t unpad(const byte[], size_t) const; + size_t unpad(const byte[], size_t) const override; - bool valid_blocksize(size_t bs) const { return (bs > 0 && bs < 256); } + bool valid_blocksize(size_t bs) const override { return (bs > 0 && bs < 256); } - std::string name() const { return "PKCS7"; } + std::string name() const override { return "PKCS7"; } }; /** @@ -80,11 +80,11 @@ class BOTAN_DLL ANSI_X923_Padding : public BlockCipherModePaddingMethod size_t final_block_bytes, size_t block_size) const override; - size_t unpad(const byte[], size_t) const; + size_t unpad(const byte[], size_t) const override; - bool valid_blocksize(size_t bs) const { return (bs > 0 && bs < 256); } + bool valid_blocksize(size_t bs) const override { return (bs > 0 && bs < 256); } - std::string name() const { return "X9.23"; } + std::string name() const override { return "X9.23"; } }; /** @@ -97,11 +97,11 @@ class BOTAN_DLL OneAndZeros_Padding : public BlockCipherModePaddingMethod size_t final_block_bytes, size_t block_size) const override; - size_t unpad(const byte[], size_t) const; + size_t unpad(const byte[], size_t) const override; - bool valid_blocksize(size_t bs) const { return (bs > 0); } + bool valid_blocksize(size_t bs) const override { return (bs > 0); } - std::string name() const { return "OneAndZeros"; } + std::string name() const override { return "OneAndZeros"; } }; /** @@ -112,11 +112,11 @@ class BOTAN_DLL Null_Padding : public BlockCipherModePaddingMethod public: void add_padding(secure_vector<byte>&, size_t, size_t) const override {} - size_t unpad(const byte[], size_t size) const { return size; } + size_t unpad(const byte[], size_t size) const override { return size; } - bool valid_blocksize(size_t) const { return true; } + bool valid_blocksize(size_t) const override { return true; } - std::string name() const { return "NoPadding"; } + std::string name() const override { return "NoPadding"; } }; BlockCipherModePaddingMethod* get_bc_pad(const std::string& algo_spec); diff --git a/src/lib/modes/stream_mode.h b/src/lib/modes/stream_mode.h index 80fec96f9..5450bc37d 100644 --- a/src/lib/modes/stream_mode.h +++ b/src/lib/modes/stream_mode.h @@ -50,7 +50,7 @@ class BOTAN_DLL Stream_Cipher_Mode : public Cipher_Mode return secure_vector<byte>(); } - void key_schedule(const byte key[], size_t length) + void key_schedule(const byte key[], size_t length) override { m_cipher->set_key(key, length); } |