diff options
author | Tomasz Frydrych <[email protected]> | 2017-04-02 22:24:31 +0200 |
---|---|---|
committer | Tomasz Frydrych <[email protected]> | 2017-04-03 23:42:29 +0200 |
commit | fbef72e11c483fae16c32480cf84253a56d0ee25 (patch) | |
tree | 200b0fe290e9809ef6c8883e886b7c9a48c902a1 /src/lib/pubkey/pk_ops_impl.h | |
parent | 753b4c2d5301574d3c9390b79aa275a49809e6c8 (diff) |
Content:
* fixes for deprecated constructions in c++11 and later (explicit rule of 3/5 or implicit rule of 0 and other violations)
* `default` specifier instead of `{}` in some places(probably all)
* removal of unreachable code (for example `return` after `throw`)
* removal of compilation unit only visible, but not used functions
* fix for `throw()` specifier - used instead `BOTAN_NOEXCEPT`
* removed not needed semicolons
Diffstat (limited to 'src/lib/pubkey/pk_ops_impl.h')
-rw-r--r-- | src/lib/pubkey/pk_ops_impl.h | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src/lib/pubkey/pk_ops_impl.h b/src/lib/pubkey/pk_ops_impl.h index f6c1b0510..958bf27ec 100644 --- a/src/lib/pubkey/pk_ops_impl.h +++ b/src/lib/pubkey/pk_ops_impl.h @@ -9,6 +9,9 @@ #define BOTAN_PK_OPERATION_IMPL_H__ #include <botan/pk_ops.h> +#include <botan/eme.h> +#include <botan/kdf.h> +#include <botan/emsa.h> namespace Botan { @@ -22,7 +25,7 @@ class Encryption_with_EME : public Encryption secure_vector<uint8_t> encrypt(const uint8_t msg[], size_t msg_len, RandomNumberGenerator& rng) override; - ~Encryption_with_EME(); + ~Encryption_with_EME() = default; protected: explicit Encryption_with_EME(const std::string& eme); private: @@ -39,7 +42,7 @@ class Decryption_with_EME : public Decryption secure_vector<uint8_t> decrypt(uint8_t& valid_mask, const uint8_t msg[], size_t msg_len) override; - ~Decryption_with_EME(); + ~Decryption_with_EME() = default; protected: explicit Decryption_with_EME(const std::string& eme); private: @@ -51,7 +54,7 @@ class Decryption_with_EME : public Decryption class Verification_with_EMSA : public Verification { public: - ~Verification_with_EMSA(); + ~Verification_with_EMSA() = default; void update(const uint8_t msg[], size_t msg_len) override; bool is_valid_signature(const uint8_t sig[], size_t sig_len) override; @@ -129,7 +132,7 @@ class Signature_with_EMSA : public Signature secure_vector<uint8_t> sign(RandomNumberGenerator& rng) override; protected: explicit Signature_with_EMSA(const std::string& emsa); - ~Signature_with_EMSA(); + ~Signature_with_EMSA() = default; std::string hash_for_signature() { return m_hash; } @@ -173,7 +176,7 @@ class Key_Agreement_with_KDF : public Key_Agreement protected: explicit Key_Agreement_with_KDF(const std::string& kdf); - ~Key_Agreement_with_KDF(); + ~Key_Agreement_with_KDF() = default; private: virtual secure_vector<uint8_t> raw_agree(const uint8_t w[], size_t w_len) = 0; std::unique_ptr<KDF> m_kdf; @@ -195,7 +198,7 @@ class KEM_Encryption_with_KDF : public KEM_Encryption Botan::RandomNumberGenerator& rng) = 0; explicit KEM_Encryption_with_KDF(const std::string& kdf); - ~KEM_Encryption_with_KDF(); + ~KEM_Encryption_with_KDF() = default; private: std::unique_ptr<KDF> m_kdf; }; @@ -214,7 +217,7 @@ class KEM_Decryption_with_KDF : public KEM_Decryption raw_kem_decrypt(const uint8_t encap_key[], size_t len) = 0; explicit KEM_Decryption_with_KDF(const std::string& kdf); - ~KEM_Decryption_with_KDF(); + ~KEM_Decryption_with_KDF() = default;; private: std::unique_ptr<KDF> m_kdf; }; |