diff options
author | lloyd <[email protected]> | 2008-11-10 22:53:59 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2008-11-10 22:53:59 +0000 |
commit | b3596de2898dab4da1fd92ddab8b6cdf2e0b5d08 (patch) | |
tree | 014935c0e3c95ff5b2388005e9f45e5d4a7fabda | |
parent | fa0b848c94c7dc574bb807b940150e3fdec775d3 (diff) |
Add constructor to StreamCipher_Filter taking StreamCipher*
-rw-r--r-- | src/filters/algo_filt.cpp | 9 | ||||
-rw-r--r-- | src/filters/filters.h | 6 |
2 files changed, 15 insertions, 0 deletions
diff --git a/src/filters/algo_filt.cpp b/src/filters/algo_filt.cpp index 33a22b703..3a1f1d5da 100644 --- a/src/filters/algo_filt.cpp +++ b/src/filters/algo_filt.cpp @@ -22,6 +22,15 @@ StreamCipher_Filter::StreamCipher_Filter(const std::string& sc_name) : /************************************************* * StreamCipher_Filter Constructor * *************************************************/ +StreamCipher_Filter::StreamCipher_Filter(StreamCipher* stream_cipher) : + buffer(DEFAULT_BUFFERSIZE) + { + base_ptr = cipher = stream_cipher; + } + +/************************************************* +* StreamCipher_Filter Constructor * +*************************************************/ StreamCipher_Filter::StreamCipher_Filter(const std::string& sc_name, const SymmetricKey& key) : buffer(DEFAULT_BUFFERSIZE) diff --git a/src/filters/filters.h b/src/filters/filters.h index af9e6a6cc..6cfbef3c0 100644 --- a/src/filters/filters.h +++ b/src/filters/filters.h @@ -55,6 +55,12 @@ class BOTAN_DLL StreamCipher_Filter : public Keyed_Filter /** * Construct a stream cipher filter. + * @param cipher_obj a cipher object to use + */ + StreamCipher_Filter(StreamCipher* cipher_obj); + + /** + * Construct a stream cipher filter. * @param cipher the name of the desired cipher */ StreamCipher_Filter(const std::string& cipher); |