aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/block
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2017-10-02 23:33:53 -0400
committerJack Lloyd <[email protected]>2017-10-02 23:34:21 -0400
commitf9090ec68986d297fd4cfd97bf75521df8f38aff (patch)
treeb7a7f687e8a4b5842f68c644ab0b3e8766f19a45 /src/lib/block
parent9701249c99e4775d7015ce5d6a884626cc8f2673 (diff)
Remove protected functions from final classes
Mostly residue from the old system of splitting impls among subclasses Found with Sonar
Diffstat (limited to 'src/lib/block')
-rw-r--r--src/lib/block/serpent/serpent.h18
-rw-r--r--src/lib/block/threefish/threefish.h3
-rw-r--r--src/lib/block/xtea/xtea.h5
3 files changed, 2 insertions, 24 deletions
diff --git a/src/lib/block/serpent/serpent.h b/src/lib/block/serpent/serpent.h
index a6463546e..bad0e0fad 100644
--- a/src/lib/block/serpent/serpent.h
+++ b/src/lib/block/serpent/serpent.h
@@ -29,7 +29,7 @@ class BOTAN_PUBLIC_API(2,0) Serpent final : public Block_Cipher_Fixed_Params<16,
size_t parallelism() const override { return 4; }
- protected:
+ private:
#if defined(BOTAN_HAS_SERPENT_SIMD)
/**
* Encrypt 4 blocks in parallel using SSE2 or AltiVec
@@ -42,22 +42,6 @@ class BOTAN_PUBLIC_API(2,0) Serpent final : public Block_Cipher_Fixed_Params<16,
void simd_decrypt_4(const uint8_t in[64], uint8_t out[64]) const;
#endif
- /**
- * For use by subclasses using SIMD, asm, etc
- * @return const reference to the key schedule
- */
- const secure_vector<uint32_t>& get_round_keys() const
- { return m_round_key; }
-
- /**
- * For use by subclasses that implement the key schedule
- * @param ks is the new key schedule value to set
- */
- void set_round_keys(const uint32_t ks[132])
- {
- m_round_key.assign(&ks[0], &ks[132]);
- }
-
private:
void key_schedule(const uint8_t key[], size_t length) override;
secure_vector<uint32_t> m_round_key;
diff --git a/src/lib/block/threefish/threefish.h b/src/lib/block/threefish/threefish.h
index de46913c5..4281e822b 100644
--- a/src/lib/block/threefish/threefish.h
+++ b/src/lib/block/threefish/threefish.h
@@ -29,10 +29,9 @@ class BOTAN_PUBLIC_API(2,0) Threefish_512 final : public Block_Cipher_Fixed_Para
BlockCipher* clone() const override { return new Threefish_512; }
size_t parallelism() const override;
- protected:
+ private:
const secure_vector<uint64_t>& get_T() const { return m_T; }
const secure_vector<uint64_t>& get_K() const { return m_K; }
- private:
#if defined(BOTAN_HAS_THREEFISH_512_AVX2)
void avx2_encrypt_n(const uint8_t in[], uint8_t out[], size_t blocks) const;
diff --git a/src/lib/block/xtea/xtea.h b/src/lib/block/xtea/xtea.h
index 3ce0fda58..5ec94fd05 100644
--- a/src/lib/block/xtea/xtea.h
+++ b/src/lib/block/xtea/xtea.h
@@ -24,11 +24,6 @@ class BOTAN_PUBLIC_API(2,0) XTEA final : public Block_Cipher_Fixed_Params<8, 16>
void clear() override;
std::string name() const override { return "XTEA"; }
BlockCipher* clone() const override { return new XTEA; }
- protected:
- /**
- * @return const reference to the key schedule
- */
- const secure_vector<uint32_t>& get_EK() const { return m_EK; }
private:
void key_schedule(const uint8_t[], size_t) override;