aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/stream
diff options
context:
space:
mode:
authorDaniel Seither <[email protected]>2015-07-30 19:17:27 +0200
committerDaniel Seither <[email protected]>2015-07-30 19:17:27 +0200
commit6817174f113a3f5c0bbafc52d2340ddb24711561 (patch)
treef685d2842f19586bc97f6afd761eb6a087883705 /src/lib/stream
parentd2cda3e74e79b2f19086d943918fdb66699f28d7 (diff)
stream: Add missing overrides
Diffstat (limited to 'src/lib/stream')
-rw-r--r--src/lib/stream/chacha/chacha.h16
-rw-r--r--src/lib/stream/ctr/ctr.h16
-rw-r--r--src/lib/stream/ofb/ofb.h16
-rw-r--r--src/lib/stream/rc4/rc4.h12
-rw-r--r--src/lib/stream/salsa20/salsa20.h16
5 files changed, 38 insertions, 38 deletions
diff --git a/src/lib/stream/chacha/chacha.h b/src/lib/stream/chacha/chacha.h
index 7e4e2b461..df6e1c9c0 100644
--- a/src/lib/stream/chacha/chacha.h
+++ b/src/lib/stream/chacha/chacha.h
@@ -18,26 +18,26 @@ namespace Botan {
class BOTAN_DLL ChaCha : public StreamCipher
{
public:
- void cipher(const byte in[], byte out[], size_t length);
+ void cipher(const byte in[], byte out[], size_t length) override;
- void set_iv(const byte iv[], size_t iv_len);
+ void set_iv(const byte iv[], size_t iv_len) override;
- bool valid_iv_length(size_t iv_len) const
+ bool valid_iv_length(size_t iv_len) const override
{ return (iv_len == 8 || iv_len == 12); }
- Key_Length_Specification key_spec() const
+ Key_Length_Specification key_spec() const override
{
return Key_Length_Specification(16, 32, 16);
}
- void clear();
- std::string name() const { return "ChaCha"; }
+ void clear() override;
+ std::string name() const override { return "ChaCha"; }
- StreamCipher* clone() const { return new ChaCha; }
+ StreamCipher* clone() const override { return new ChaCha; }
protected:
virtual void chacha(byte output[64], const u32bit input[16]);
private:
- void key_schedule(const byte key[], size_t key_len);
+ void key_schedule(const byte key[], size_t key_len) override;
secure_vector<u32bit> m_state;
secure_vector<byte> m_buffer;
diff --git a/src/lib/stream/ctr/ctr.h b/src/lib/stream/ctr/ctr.h
index 1515b0e82..f59f06d5f 100644
--- a/src/lib/stream/ctr/ctr.h
+++ b/src/lib/stream/ctr/ctr.h
@@ -19,24 +19,24 @@ namespace Botan {
class BOTAN_DLL CTR_BE : public StreamCipher
{
public:
- void cipher(const byte in[], byte out[], size_t length);
+ void cipher(const byte in[], byte out[], size_t length) override;
- void set_iv(const byte iv[], size_t iv_len);
+ void set_iv(const byte iv[], size_t iv_len) override;
- bool valid_iv_length(size_t iv_len) const
+ bool valid_iv_length(size_t iv_len) const override
{ return (iv_len <= m_cipher->block_size()); }
- Key_Length_Specification key_spec() const
+ Key_Length_Specification key_spec() const override
{
return m_cipher->key_spec();
}
- std::string name() const;
+ std::string name() const override;
- CTR_BE* clone() const
+ CTR_BE* clone() const override
{ return new CTR_BE(m_cipher->clone()); }
- void clear();
+ void clear() override;
static CTR_BE* make(const Spec& spec);
@@ -45,7 +45,7 @@ class BOTAN_DLL CTR_BE : public StreamCipher
*/
CTR_BE(BlockCipher* cipher);
private:
- void key_schedule(const byte key[], size_t key_len);
+ void key_schedule(const byte key[], size_t key_len) override;
void increment_counter();
std::unique_ptr<BlockCipher> m_cipher;
diff --git a/src/lib/stream/ofb/ofb.h b/src/lib/stream/ofb/ofb.h
index 09e11644a..32dc199bc 100644
--- a/src/lib/stream/ofb/ofb.h
+++ b/src/lib/stream/ofb/ofb.h
@@ -19,24 +19,24 @@ namespace Botan {
class BOTAN_DLL OFB : public StreamCipher
{
public:
- void cipher(const byte in[], byte out[], size_t length);
+ void cipher(const byte in[], byte out[], size_t length) override;
- void set_iv(const byte iv[], size_t iv_len);
+ void set_iv(const byte iv[], size_t iv_len) override;
- bool valid_iv_length(size_t iv_len) const
+ bool valid_iv_length(size_t iv_len) const override
{ return (iv_len <= m_cipher->block_size()); }
- Key_Length_Specification key_spec() const
+ Key_Length_Specification key_spec() const override
{
return m_cipher->key_spec();
}
- std::string name() const;
+ std::string name() const override;
- OFB* clone() const
+ OFB* clone() const override
{ return new OFB(m_cipher->clone()); }
- void clear();
+ void clear() override;
static OFB* make(const Spec& spec);
@@ -45,7 +45,7 @@ class BOTAN_DLL OFB : public StreamCipher
*/
OFB(BlockCipher* cipher);
private:
- void key_schedule(const byte key[], size_t key_len);
+ void key_schedule(const byte key[], size_t key_len) override;
std::unique_ptr<BlockCipher> m_cipher;
secure_vector<byte> m_buffer;
diff --git a/src/lib/stream/rc4/rc4.h b/src/lib/stream/rc4/rc4.h
index b2006fec5..60c9450b4 100644
--- a/src/lib/stream/rc4/rc4.h
+++ b/src/lib/stream/rc4/rc4.h
@@ -19,14 +19,14 @@ namespace Botan {
class BOTAN_DLL RC4 : public StreamCipher
{
public:
- void cipher(const byte in[], byte out[], size_t length);
+ void cipher(const byte in[], byte out[], size_t length) override;
- void clear();
- std::string name() const;
+ void clear() override;
+ std::string name() const override;
- StreamCipher* clone() const { return new RC4(SKIP); }
+ StreamCipher* clone() const override { return new RC4(SKIP); }
- Key_Length_Specification key_spec() const
+ Key_Length_Specification key_spec() const override
{
return Key_Length_Specification(1, 256);
}
@@ -40,7 +40,7 @@ class BOTAN_DLL RC4 : public StreamCipher
~RC4() { clear(); }
private:
- void key_schedule(const byte[], size_t);
+ void key_schedule(const byte[], size_t) override;
void generate();
const size_t SKIP;
diff --git a/src/lib/stream/salsa20/salsa20.h b/src/lib/stream/salsa20/salsa20.h
index a2b3790ce..a5e7a1f14 100644
--- a/src/lib/stream/salsa20/salsa20.h
+++ b/src/lib/stream/salsa20/salsa20.h
@@ -18,23 +18,23 @@ namespace Botan {
class BOTAN_DLL Salsa20 : public StreamCipher
{
public:
- void cipher(const byte in[], byte out[], size_t length);
+ void cipher(const byte in[], byte out[], size_t length) override;
- void set_iv(const byte iv[], size_t iv_len);
+ void set_iv(const byte iv[], size_t iv_len) override;
- bool valid_iv_length(size_t iv_len) const
+ bool valid_iv_length(size_t iv_len) const override
{ return (iv_len == 8 || iv_len == 24); }
- Key_Length_Specification key_spec() const
+ Key_Length_Specification key_spec() const override
{
return Key_Length_Specification(16, 32, 16);
}
- void clear();
- std::string name() const;
- StreamCipher* clone() const { return new Salsa20; }
+ void clear() override;
+ std::string name() const override;
+ StreamCipher* clone() const override { return new Salsa20; }
private:
- void key_schedule(const byte key[], size_t key_len);
+ void key_schedule(const byte key[], size_t key_len) override;
secure_vector<u32bit> m_state;
secure_vector<byte> m_buffer;