diff options
author | Jack Lloyd <[email protected]> | 2017-10-02 23:49:07 -0400 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2017-10-02 23:49:07 -0400 |
commit | a0a27808005346ef151ea7b07550dc03434b9e84 (patch) | |
tree | 567aee4712af106056906b7578daa9b2300d4828 | |
parent | ddab037dd56a9cfb86e4853ad62170ad9dc3748a (diff) |
Remove unnecessary virtuals from final classes
Found with Sonar
-rw-r--r-- | src/lib/block/threefish/threefish.h | 4 | ||||
-rw-r--r-- | src/lib/pubkey/xmss/xmss_privatekey.h | 2 | ||||
-rw-r--r-- | src/lib/pubkey/xmss/xmss_signature_operation.h | 1 | ||||
-rw-r--r-- | src/lib/pubkey/xmss/xmss_verification_operation.h | 2 | ||||
-rw-r--r-- | src/lib/pubkey/xmss/xmss_wots_privatekey.h | 4 | ||||
-rw-r--r-- | src/lib/pubkey/xmss/xmss_wots_verification_operation.h | 3 |
6 files changed, 6 insertions, 10 deletions
diff --git a/src/lib/block/threefish/threefish.h b/src/lib/block/threefish/threefish.h index 4281e822b..6b87c3eb2 100644 --- a/src/lib/block/threefish/threefish.h +++ b/src/lib/block/threefish/threefish.h @@ -43,8 +43,8 @@ class BOTAN_PUBLIC_API(2,0) Threefish_512 final : public Block_Cipher_Fixed_Para // Interface for Skein friend class Skein_512; - virtual void skein_feedfwd(const secure_vector<uint64_t>& M, - const secure_vector<uint64_t>& T); + void skein_feedfwd(const secure_vector<uint64_t>& M, + const secure_vector<uint64_t>& T); // Private data secure_vector<uint64_t> m_T; diff --git a/src/lib/pubkey/xmss/xmss_privatekey.h b/src/lib/pubkey/xmss/xmss_privatekey.h index ccba4f26c..b5ddc1a91 100644 --- a/src/lib/pubkey/xmss/xmss_privatekey.h +++ b/src/lib/pubkey/xmss/xmss_privatekey.h @@ -221,7 +221,7 @@ class BOTAN_PUBLIC_API(2,0) XMSS_PrivateKey final : public virtual XMSS_PublicKe * 4-byte OID, n-byte root node, n-byte public seed, * 8-byte unused leaf index, n-byte prf seed, n-byte private seed. **/ - virtual secure_vector<uint8_t> raw_private_key() const; + secure_vector<uint8_t> raw_private_key() const; /** * Algorithm 9: "treeHash" * Computes the internal n-byte nodes of a Merkle tree. diff --git a/src/lib/pubkey/xmss/xmss_signature_operation.h b/src/lib/pubkey/xmss/xmss_signature_operation.h index f974213e0..6bda81036 100644 --- a/src/lib/pubkey/xmss/xmss_signature_operation.h +++ b/src/lib/pubkey/xmss/xmss_signature_operation.h @@ -37,7 +37,6 @@ class XMSS_Signature_Operation final : public virtual PK_Ops::Signature, { public: XMSS_Signature_Operation(const XMSS_PrivateKey& private_key); - virtual ~XMSS_Signature_Operation() = default; /** * Creates an XMSS signature for the message provided through call to diff --git a/src/lib/pubkey/xmss/xmss_verification_operation.h b/src/lib/pubkey/xmss/xmss_verification_operation.h index de3d22ae6..1b42bb158 100644 --- a/src/lib/pubkey/xmss/xmss_verification_operation.h +++ b/src/lib/pubkey/xmss/xmss_verification_operation.h @@ -32,8 +32,6 @@ namespace Botan { XMSS_Verification_Operation( const XMSS_PublicKey& public_key); - virtual ~XMSS_Verification_Operation() = default; - bool is_valid_signature(const uint8_t sig[], size_t sig_len) override; void update(const uint8_t msg[], size_t msg_len) override; diff --git a/src/lib/pubkey/xmss/xmss_wots_privatekey.h b/src/lib/pubkey/xmss/xmss_wots_privatekey.h index 5e15f9b24..686162911 100644 --- a/src/lib/pubkey/xmss/xmss_wots_privatekey.h +++ b/src/lib/pubkey/xmss/xmss_wots_privatekey.h @@ -214,13 +214,13 @@ class BOTAN_PUBLIC_API(2,0) XMSS_WOTS_PrivateKey final : public virtual XMSS_WOT m_private_seed = std::move(private_seed); } - virtual AlgorithmIdentifier + AlgorithmIdentifier pkcs8_algorithm_identifier() const override { throw Not_Implemented("No AlgorithmIdentifier available for XMSS-WOTS."); } - virtual std::unique_ptr<PK_Ops::Signature> + std::unique_ptr<PK_Ops::Signature> create_signature_op(RandomNumberGenerator&, const std::string&, const std::string& provider) const override; diff --git a/src/lib/pubkey/xmss/xmss_wots_verification_operation.h b/src/lib/pubkey/xmss/xmss_wots_verification_operation.h index 863e05de7..a7758bee9 100644 --- a/src/lib/pubkey/xmss/xmss_wots_verification_operation.h +++ b/src/lib/pubkey/xmss/xmss_wots_verification_operation.h @@ -34,8 +34,7 @@ class XMSS_WOTS_Verification_Operation virtual ~XMSS_WOTS_Verification_Operation() = default; - virtual bool is_valid_signature(const uint8_t sig[], - size_t sig_len) override; + bool is_valid_signature(const uint8_t sig[], size_t sig_len) override; void update(const uint8_t msg[], size_t msg_len) override; |