diff options
author | Jack Lloyd <[email protected]> | 2016-01-10 00:51:48 -0500 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2016-01-10 00:51:48 -0500 |
commit | 45124582e3b964800f0be1f88773dd6f2cafc672 (patch) | |
tree | 9bd788556ddf9731e466b7f24a16e604f662ea24 /src/lib/pk_pad | |
parent | 672d29570e55686b90126b5d6f5d337ddf0b8f04 (diff) |
Add final attribute to many classes
In some cases this can offer better optimization, via devirtualization.
And it lets the user know the class is not intended for derivation.
Some discussion in GH #402
Diffstat (limited to 'src/lib/pk_pad')
-rw-r--r-- | src/lib/pk_pad/eme_oaep/oaep.h | 2 | ||||
-rw-r--r-- | src/lib/pk_pad/eme_pkcs1/eme_pkcs.h | 2 | ||||
-rw-r--r-- | src/lib/pk_pad/eme_raw/eme_raw.h | 2 | ||||
-rw-r--r-- | src/lib/pk_pad/emsa1_bsi/emsa1_bsi.h | 2 | ||||
-rw-r--r-- | src/lib/pk_pad/emsa_pkcs1/emsa_pkcs1.h | 4 | ||||
-rw-r--r-- | src/lib/pk_pad/emsa_pssr/pssr.h | 2 | ||||
-rw-r--r-- | src/lib/pk_pad/emsa_raw/emsa_raw.h | 2 | ||||
-rw-r--r-- | src/lib/pk_pad/emsa_x931/emsa_x931.h | 2 |
8 files changed, 9 insertions, 9 deletions
diff --git a/src/lib/pk_pad/eme_oaep/oaep.h b/src/lib/pk_pad/eme_oaep/oaep.h index 13e6efeec..22d009f5f 100644 --- a/src/lib/pk_pad/eme_oaep/oaep.h +++ b/src/lib/pk_pad/eme_oaep/oaep.h @@ -16,7 +16,7 @@ namespace Botan { /** * OAEP (called EME1 in IEEE 1363 and in earlier versions of the library) */ -class BOTAN_DLL OAEP : public EME +class BOTAN_DLL OAEP final : public EME { public: size_t maximum_input_size(size_t) const override; diff --git a/src/lib/pk_pad/eme_pkcs1/eme_pkcs.h b/src/lib/pk_pad/eme_pkcs1/eme_pkcs.h index 83c99e61b..148ab7e20 100644 --- a/src/lib/pk_pad/eme_pkcs1/eme_pkcs.h +++ b/src/lib/pk_pad/eme_pkcs1/eme_pkcs.h @@ -15,7 +15,7 @@ namespace Botan { /** * EME from PKCS #1 v1.5 */ -class BOTAN_DLL EME_PKCS1v15 : public EME +class BOTAN_DLL EME_PKCS1v15 final : public EME { public: size_t maximum_input_size(size_t) const override; diff --git a/src/lib/pk_pad/eme_raw/eme_raw.h b/src/lib/pk_pad/eme_raw/eme_raw.h index 04604c72d..ae57587a3 100644 --- a/src/lib/pk_pad/eme_raw/eme_raw.h +++ b/src/lib/pk_pad/eme_raw/eme_raw.h @@ -11,7 +11,7 @@ namespace Botan { -class BOTAN_DLL EME_Raw : public EME +class BOTAN_DLL EME_Raw final : public EME { public: size_t maximum_input_size(size_t i) const override; diff --git a/src/lib/pk_pad/emsa1_bsi/emsa1_bsi.h b/src/lib/pk_pad/emsa1_bsi/emsa1_bsi.h index 24d8b99e2..f00c0a101 100644 --- a/src/lib/pk_pad/emsa1_bsi/emsa1_bsi.h +++ b/src/lib/pk_pad/emsa1_bsi/emsa1_bsi.h @@ -18,7 +18,7 @@ namespace Botan { * only hash values which are less or equal than the maximum key * length. The implementation comes from InSiTo */ -class BOTAN_DLL EMSA1_BSI : public EMSA1 +class BOTAN_DLL EMSA1_BSI final : public EMSA1 { public: /** diff --git a/src/lib/pk_pad/emsa_pkcs1/emsa_pkcs1.h b/src/lib/pk_pad/emsa_pkcs1/emsa_pkcs1.h index fa3fc2ae2..f217af764 100644 --- a/src/lib/pk_pad/emsa_pkcs1/emsa_pkcs1.h +++ b/src/lib/pk_pad/emsa_pkcs1/emsa_pkcs1.h @@ -18,7 +18,7 @@ namespace Botan { * aka PKCS #1 block type 1 * aka EMSA3 from IEEE 1363 */ -class BOTAN_DLL EMSA_PKCS1v15 : public EMSA +class BOTAN_DLL EMSA_PKCS1v15 final : public EMSA { public: static EMSA* make(const EMSA::Spec& spec); @@ -47,7 +47,7 @@ class BOTAN_DLL EMSA_PKCS1v15 : public EMSA * (which according to QCA docs is "identical to PKCS#11's CKM_RSA_PKCS * mechanism", something I have not confirmed) */ -class BOTAN_DLL EMSA_PKCS1v15_Raw : public EMSA +class BOTAN_DLL EMSA_PKCS1v15_Raw final : public EMSA { public: void update(const byte[], size_t) override; diff --git a/src/lib/pk_pad/emsa_pssr/pssr.h b/src/lib/pk_pad/emsa_pssr/pssr.h index 399090389..edbda4640 100644 --- a/src/lib/pk_pad/emsa_pssr/pssr.h +++ b/src/lib/pk_pad/emsa_pssr/pssr.h @@ -16,7 +16,7 @@ namespace Botan { /** * PSSR (called EMSA4 in IEEE 1363 and in old versions of the library) */ -class BOTAN_DLL PSSR : public EMSA +class BOTAN_DLL PSSR final : public EMSA { public: diff --git a/src/lib/pk_pad/emsa_raw/emsa_raw.h b/src/lib/pk_pad/emsa_raw/emsa_raw.h index 8eb6dc788..272d34b0e 100644 --- a/src/lib/pk_pad/emsa_raw/emsa_raw.h +++ b/src/lib/pk_pad/emsa_raw/emsa_raw.h @@ -16,7 +16,7 @@ namespace Botan { * EMSA-Raw - sign inputs directly * Don't use this unless you know what you are doing. */ -class BOTAN_DLL EMSA_Raw : public EMSA +class BOTAN_DLL EMSA_Raw final : public EMSA { private: void update(const byte[], size_t) override; diff --git a/src/lib/pk_pad/emsa_x931/emsa_x931.h b/src/lib/pk_pad/emsa_x931/emsa_x931.h index 29bad4a4a..3372ac13c 100644 --- a/src/lib/pk_pad/emsa_x931/emsa_x931.h +++ b/src/lib/pk_pad/emsa_x931/emsa_x931.h @@ -18,7 +18,7 @@ namespace Botan { * Useful for Rabin-Williams, also sometimes used with RSA in * odd protocols. */ -class BOTAN_DLL EMSA_X931 : public EMSA +class BOTAN_DLL EMSA_X931 final : public EMSA { public: /** |