diff options
Diffstat (limited to 'src/lib/block/cascade/cascade.h')
-rw-r--r-- | src/lib/block/cascade/cascade.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/lib/block/cascade/cascade.h b/src/lib/block/cascade/cascade.h index b5f9b5653..6021bfc73 100644 --- a/src/lib/block/cascade/cascade.h +++ b/src/lib/block/cascade/cascade.h @@ -21,7 +21,7 @@ class Cascade_Cipher final : public BlockCipher void encrypt_n(const uint8_t in[], uint8_t out[], size_t blocks) const override; void decrypt_n(const uint8_t in[], uint8_t out[], size_t blocks) const override; - size_t block_size() const override { return m_block; } + size_t block_size() const override { return m_block_size; } Key_Length_Specification key_spec() const override { @@ -31,22 +31,23 @@ class Cascade_Cipher final : public BlockCipher void clear() override; std::string name() const override; - BlockCipher* clone() const override; + std::unique_ptr<BlockCipher> new_object() const override; /** * Create a cascade of two block ciphers * @param cipher1 the first cipher * @param cipher2 the second cipher */ - Cascade_Cipher(BlockCipher* cipher1, BlockCipher* cipher2); + Cascade_Cipher(std::unique_ptr<BlockCipher> cipher1, + std::unique_ptr<BlockCipher> cipher2); Cascade_Cipher(const Cascade_Cipher&) = delete; Cascade_Cipher& operator=(const Cascade_Cipher&) = delete; private: void key_schedule(const uint8_t[], size_t) override; - size_t m_block; std::unique_ptr<BlockCipher> m_cipher1, m_cipher2; + size_t m_block_size; }; |