diff options
Diffstat (limited to 'src/lib/modes')
-rw-r--r-- | src/lib/modes/aead/ocb/ocb.cpp | 2 | ||||
-rw-r--r-- | src/lib/modes/aead/siv/siv.h | 6 | ||||
-rw-r--r-- | src/lib/modes/cbc/cbc.h | 4 | ||||
-rw-r--r-- | src/lib/modes/stream_mode.h | 2 | ||||
-rw-r--r-- | src/lib/modes/xts/xts.h | 6 |
5 files changed, 10 insertions, 10 deletions
diff --git a/src/lib/modes/aead/ocb/ocb.cpp b/src/lib/modes/aead/ocb/ocb.cpp index 08157cd47..77126ec7a 100644 --- a/src/lib/modes/aead/ocb/ocb.cpp +++ b/src/lib/modes/aead/ocb/ocb.cpp @@ -15,7 +15,7 @@ namespace Botan { class L_computer { public: - L_computer(const BlockCipher& cipher) + explicit L_computer(const BlockCipher& cipher) { m_L_star.resize(cipher.block_size()); cipher.encrypt(m_L_star); diff --git a/src/lib/modes/aead/siv/siv.h b/src/lib/modes/aead/siv/siv.h index d46c7dcfd..d3e4c5270 100644 --- a/src/lib/modes/aead/siv/siv.h +++ b/src/lib/modes/aead/siv/siv.h @@ -43,7 +43,7 @@ class BOTAN_DLL SIV_Mode : public AEAD_Mode size_t tag_size() const override { return 16; } protected: - SIV_Mode(BlockCipher* cipher); + explicit SIV_Mode(BlockCipher* cipher); StreamCipher& ctr() { return *m_ctr; } @@ -73,7 +73,7 @@ class BOTAN_DLL SIV_Encryption final : public SIV_Mode /** * @param cipher a block cipher */ - SIV_Encryption(BlockCipher* cipher) : SIV_Mode(cipher) {} + explicit SIV_Encryption(BlockCipher* cipher) : SIV_Mode(cipher) {} void finish(secure_vector<byte>& final_block, size_t offset = 0) override; @@ -92,7 +92,7 @@ class BOTAN_DLL SIV_Decryption final : public SIV_Mode /** * @param cipher a 128-bit block cipher */ - SIV_Decryption(BlockCipher* cipher) : SIV_Mode(cipher) {} + explicit SIV_Decryption(BlockCipher* cipher) : SIV_Mode(cipher) {} void finish(secure_vector<byte>& final_block, size_t offset = 0) override; diff --git a/src/lib/modes/cbc/cbc.h b/src/lib/modes/cbc/cbc.h index 9a767d3a0..961991d4a 100644 --- a/src/lib/modes/cbc/cbc.h +++ b/src/lib/modes/cbc/cbc.h @@ -80,7 +80,7 @@ class BOTAN_DLL CBC_Encryption : public CBC_Mode class BOTAN_DLL CTS_Encryption final : public CBC_Encryption { public: - CTS_Encryption(BlockCipher* cipher) : CBC_Encryption(cipher, nullptr) {} + explicit CTS_Encryption(BlockCipher* cipher) : CBC_Encryption(cipher, nullptr) {} size_t output_length(size_t input_length) const override; @@ -117,7 +117,7 @@ class BOTAN_DLL CBC_Decryption : public CBC_Mode class BOTAN_DLL CTS_Decryption final : public CBC_Decryption { public: - CTS_Decryption(BlockCipher* cipher) : CBC_Decryption(cipher, nullptr) {} + explicit CTS_Decryption(BlockCipher* cipher) : CBC_Decryption(cipher, nullptr) {} void finish(secure_vector<byte>& final_block, size_t offset = 0) override; diff --git a/src/lib/modes/stream_mode.h b/src/lib/modes/stream_mode.h index 5450bc37d..f5f1aa33a 100644 --- a/src/lib/modes/stream_mode.h +++ b/src/lib/modes/stream_mode.h @@ -15,7 +15,7 @@ namespace Botan { class BOTAN_DLL Stream_Cipher_Mode : public Cipher_Mode { public: - Stream_Cipher_Mode(StreamCipher* cipher) : m_cipher(cipher) {} + explicit Stream_Cipher_Mode(StreamCipher* cipher) : m_cipher(cipher) {} void update(secure_vector<byte>& buf, size_t offset) override { diff --git a/src/lib/modes/xts/xts.h b/src/lib/modes/xts/xts.h index 2df18e82f..e751b1644 100644 --- a/src/lib/modes/xts/xts.h +++ b/src/lib/modes/xts/xts.h @@ -33,7 +33,7 @@ class BOTAN_DLL XTS_Mode : public Cipher_Mode void clear() override; protected: - XTS_Mode(BlockCipher* cipher); + explicit XTS_Mode(BlockCipher* cipher); const byte* tweak() const { return m_tweak.data(); } @@ -55,7 +55,7 @@ class BOTAN_DLL XTS_Mode : public Cipher_Mode class BOTAN_DLL XTS_Encryption final : public XTS_Mode { public: - XTS_Encryption(BlockCipher* cipher) : XTS_Mode(cipher) {} + explicit XTS_Encryption(BlockCipher* cipher) : XTS_Mode(cipher) {} void update(secure_vector<byte>& blocks, size_t offset = 0) override; @@ -70,7 +70,7 @@ class BOTAN_DLL XTS_Encryption final : public XTS_Mode class BOTAN_DLL XTS_Decryption final : public XTS_Mode { public: - XTS_Decryption(BlockCipher* cipher) : XTS_Mode(cipher) {} + explicit XTS_Decryption(BlockCipher* cipher) : XTS_Mode(cipher) {} void update(secure_vector<byte>& blocks, size_t offset = 0) override; |