diff options
author | lloyd <[email protected]> | 2008-11-08 22:15:59 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2008-11-08 22:15:59 +0000 |
commit | 9186c2a1e312cfd8d73a921985960078476d6e04 (patch) | |
tree | 87dd9ba802852a871e3b158923d9090effc56bf6 /src/modes | |
parent | 6d6279835ed48e33c3cfd3174fe7c7413a0bb435 (diff) |
Remove use of lookup.h from OFB
Diffstat (limited to 'src/modes')
-rw-r--r-- | src/modes/ctr/ctr.cpp | 1 | ||||
-rw-r--r-- | src/modes/ofb/ofb.cpp | 11 | ||||
-rw-r--r-- | src/modes/ofb/ofb.h | 13 |
3 files changed, 12 insertions, 13 deletions
diff --git a/src/modes/ctr/ctr.cpp b/src/modes/ctr/ctr.cpp index e61c8746c..a17343df1 100644 --- a/src/modes/ctr/ctr.cpp +++ b/src/modes/ctr/ctr.cpp @@ -4,7 +4,6 @@ *************************************************/ #include <botan/ctr.h> -#include <botan/lookup.h> #include <botan/xor_buf.h> #include <algorithm> diff --git a/src/modes/ofb/ofb.cpp b/src/modes/ofb/ofb.cpp index 8162f97ba..6f88a9bfd 100644 --- a/src/modes/ofb/ofb.cpp +++ b/src/modes/ofb/ofb.cpp @@ -4,7 +4,6 @@ *************************************************/ #include <botan/ofb.h> -#include <botan/lookup.h> #include <botan/xor_buf.h> #include <algorithm> @@ -13,19 +12,17 @@ namespace Botan { /************************************************* * OFB Constructor * *************************************************/ -OFB::OFB(const std::string& cipher_name) : - BlockCipherMode(get_block_cipher(cipher_name), - "OFB", block_size_of(cipher_name), 2) +OFB::OFB(BlockCipher* ciph) : + BlockCipherMode(ciph, "OFB", ciph->BLOCK_SIZE, 2) { } /************************************************* * OFB Constructor * *************************************************/ -OFB::OFB(const std::string& cipher_name, const SymmetricKey& key, +OFB::OFB(BlockCipher* ciph, const SymmetricKey& key, const InitializationVector& iv) : - BlockCipherMode(get_block_cipher(cipher_name), - "OFB", block_size_of(cipher_name), 2) + BlockCipherMode(ciph, "OFB", ciph->BLOCK_SIZE, 2) { set_key(key); set_iv(iv); diff --git a/src/modes/ofb/ofb.h b/src/modes/ofb/ofb.h index 3bf6f9883..53ec695bf 100644 --- a/src/modes/ofb/ofb.h +++ b/src/modes/ofb/ofb.h @@ -3,10 +3,11 @@ * (C) 1999-2007 Jack Lloyd * *************************************************/ -#ifndef BOTAN_OFB_H__ -#define BOTAN_OFB_H__ +#ifndef BOTAN_OUTPUT_FEEDBACK_MODE_H__ +#define BOTAN_OUTPUT_FEEDBACK_MODE_H__ #include <botan/modebase.h> +#include <botan/block_cipher.h> namespace Botan { @@ -16,9 +17,11 @@ namespace Botan { class BOTAN_DLL OFB : public BlockCipherMode { public: - OFB(const std::string&); - OFB(const std::string&, - const SymmetricKey&, const InitializationVector&); + OFB(BlockCipher* cipher); + + OFB(BlockCipher* cipher, + const SymmetricKey& key, + const InitializationVector& iv); private: void write(const byte[], u32bit); }; |