aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/stream/ofb/ofb.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/stream/ofb/ofb.h')
-rw-r--r--src/lib/stream/ofb/ofb.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/lib/stream/ofb/ofb.h b/src/lib/stream/ofb/ofb.h
index 9d4fd882f..0d08dac0a 100644
--- a/src/lib/stream/ofb/ofb.h
+++ b/src/lib/stream/ofb/ofb.h
@@ -10,6 +10,7 @@
#include <botan/stream_cipher.h>
#include <botan/block_cipher.h>
+#include <memory>
namespace Botan {
@@ -24,17 +25,17 @@ class BOTAN_DLL OFB : public StreamCipher
void set_iv(const byte iv[], size_t iv_len);
bool valid_iv_length(size_t iv_len) const
- { return (iv_len <= permutation->block_size()); }
+ { return (iv_len <= m_cipher->block_size()); }
Key_Length_Specification key_spec() const
{
- return permutation->key_spec();
+ return m_cipher->key_spec();
}
std::string name() const;
OFB* clone() const
- { return new OFB(permutation->clone()); }
+ { return new OFB(m_cipher->clone()); }
void clear();
@@ -42,13 +43,12 @@ class BOTAN_DLL OFB : public StreamCipher
* @param cipher the underlying block cipher to use
*/
OFB(BlockCipher* cipher);
- ~OFB();
private:
void key_schedule(const byte key[], size_t key_len);
- BlockCipher* permutation;
- secure_vector<byte> buffer;
- size_t position;
+ std::unique_ptr<BlockCipher> m_cipher;
+ secure_vector<byte> m_buffer;
+ size_t m_buf_pos;
};
}